-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I'm finding that have_selector doesn't behave as described in the documentation (http://rubydoc.info/gems/rspec-rails/frames). I'm using rspec with capybara, and while have_selector correctly fails when provided tags are missing, it doesn't fail for any content passed as a secondary requirement.
For example:
it "should load acceptance page after login" do
visit "/"
u = Factory.create(:user)
fill_in "user[email]", :with => 'jason1@test.com'
fill_in "user[password]", :with => 'lada123'
click_button "Sign in"
page.should have_selector("p.notice", :content => "Signed in") # this shouldn't and doesn't fail
page.should have_content("XYZABC") # this fails
page.should have_selector("p.notice", :content => "XYZABC") # this should but doesn't fail
Note: I'm using rails 3.1.1, rspec-rails 2.7.0, capybara 1.1.1, and I'm doing require 'capybara/rspec' in my spec_helper.
Metadata
Metadata
Assignees
Labels
No labels