rspec - Ruby Debug "no such file to load --spec_helper" -


noob may missing obvious ... i'm trying debug rspec file. rspec file stripped down @ point:

  require 'spec_helper'    describe pagescontroller      render_views      describe "get 'home'"         describe "when not signed in"          before(:each)           :home         end          "should successful"           response.should be_success         end          "should have vendor section"           response.should have_selector("h1", :content => "vendor")         end          "should have hospital section"           response.should have_selector("h1", :content => "hospital")         end     end   end 

i make following call command line:

rdebug spec/controllers/pages_controller_spec.rb 

the debugger runs, throws following error:

> require 'spec_helper'      <internal:lib/rubygems/custom_require>:29:in `require'     <internal:lib/rubygems/custom_require>:29:in `require'     /home/kevin/.rvm/bin/rails_projects/evaluationrx/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'     /home/kevin/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/ruby-debug19-0.11.6/bin/rdebug:125:in `debug_load'     /home/kevin/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/ruby-debug19-0.11.6/bin/rdebug:125:in `debug_program'     /home/kevin/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/ruby-debug19-0.11.6/bin/rdebug:412:in `<top (required)>'     /home/kevin/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/rdebug:19:in `load'     /home/kevin/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/rdebug:19:in `<main>' uncaught exception: no such file load -- spec_helper 

rspec without debugger without problem. i'm using rspec 2.3.0, ruby-debug19 (0.11.6), rails 3.0.3 , ruby 1.9.2. why can't debugger see spec_helper file?

i assume spec_helper.rb resides in spec directory? try:

require_relative '../spec_helper' 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -