Rspec test should pass but fails

前端 未结 4 1308
独厮守ぢ
独厮守ぢ 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:10

    I've been using the following and they have been posting green. I dropped have_selector and went with have_title.

    it { should have_title( full_title('Sign up') ) }

    -- and --

    it { should have_title(user.name) }

    This is with capybara 2.2.0.

提交回复
热议问题