Rspec test should pass but fails

前端 未结 4 1304
独厮守ぢ
独厮守ぢ 2021-01-14 16:59

I have this test from michael hartl book:

require \'spec_helper\'
  describe \"Static pages\" do
    let(:base_title) { \"Ruby on Rails Tutorial Sample App\"         


        
4条回答
  •  迷失自我
    2021-01-14 17:19

    For the time being, you should do what @dimuch suggests and make sure you specify the same Capybara version Michael Hartl uses in the tutorial (1.1.2).

    If you want to upgrade to Capybara 2.0 in the future and keep your tests for titles, have a look at this StackOverflow answer for a guide to creating a RSpec matcher that will do what you're expecting.

提交回复
热议问题