undefined method `get' for #

前端 未结 12 882
野性不改
野性不改 2020-11-30 00:57

Anyone know how to get around this? On OSX, trying to get RSpec running with Rails 3.0.7. Full details at: https://gist.github.com/1017044

  it \"renders but         


        
12条回答
  •  青春惊慌失措
    2020-11-30 01:25

    I had this issue when I added

    gem 'rspec'
    

    to my Gemfile in the rails project. It should be

    gem 'rspec'
    gem 'rspec-rails'
    

    (or just rspec-rails). After

    bundle install
    

    re-create the spec directory with

    rspec --init
    

    and put your xxx_spec.rb file in the appropriate directory (won't work if it is in the spec directory). Beginners error but maybe this helps somebody ;) Here's the link that helped me:

    https://www.relishapp.com/rspec/rspec-rails/docs/gettingstarted

提交回复
热议问题