undefined method `get' for #

前端 未结 12 888
野性不改
野性不改 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:48

    Solved by replacing the line
    describe PagesController do with RSpec.describe PagesController, :type => :controller do
    in the _spec.rb file in spec folder.
    Also to prevent deprecation warning use expect(response).to be_success instead of response should be_success.
    PS: Didn't have to add require "rails_helper".

提交回复
热议问题