Change RSpec descriptions from should has to should have

This commit is contained in:
Russell Shurts 2012-07-05 19:09:28 -05:00
parent c4db33a2dd
commit 025f7297fa
2 changed files with 14 additions and 14 deletions

View File

@ -27,7 +27,7 @@ module Capybara
end
def description
"has #{query.description}"
"have #{query.description}"
end
def wrap(actual)
@ -82,7 +82,7 @@ module Capybara
end
def description
"has #{selector_name}"
"have #{selector_name}"
end
def selector_name

View File

@ -8,7 +8,7 @@ describe Capybara::RSpecMatchers do
describe "have_css matcher" do
it "gives proper description" do
have_css('h1').description.should == "has css \"h1\""
have_css('h1').description.should == "have css \"h1\""
end
context "on a string" do
@ -90,7 +90,7 @@ describe Capybara::RSpecMatchers do
describe "have_xpath matcher" do
it "gives proper description" do
have_xpath('//h1').description.should == "has xpath \"\/\/h1\""
have_xpath('//h1').description.should == "have xpath \"\/\/h1\""
end
context "on a string" do
@ -154,7 +154,7 @@ describe Capybara::RSpecMatchers do
it "gives proper description" do
matcher = have_selector('//h1')
"<h1>Text</h1>".should matcher
matcher.description.should == "has xpath \"//h1\""
matcher.description.should == "have xpath \"//h1\""
end
context "on a string" do
@ -242,7 +242,7 @@ describe Capybara::RSpecMatchers do
describe "have_content matcher" do
it "gives proper description" do
have_content('Text').description.should == "has content \"Text\""
have_content('Text').description.should == "have content \"Text\""
end
context "on a string" do
@ -314,7 +314,7 @@ describe Capybara::RSpecMatchers do
describe "have_text matcher" do
it "gives proper description" do
have_text('Text').description.should == "has text \"Text\""
have_text('Text').description.should == "have text \"Text\""
end
context "on a string" do
@ -388,7 +388,7 @@ describe Capybara::RSpecMatchers do
let(:html) { '<a href="#">Just a link</a>' }
it "gives proper description" do
have_link('Just a link').description.should == "has link \"Just a link\""
have_link('Just a link').description.should == "have link \"Just a link\""
end
it "passes if there is such a button" do
@ -406,7 +406,7 @@ describe Capybara::RSpecMatchers do
let(:html) { '<button>A button</button><input type="submit" value="Another button"/>' }
it "gives proper description" do
have_button('A button').description.should == "has button \"A button\""
have_button('A button').description.should == "have button \"A button\""
end
it "passes if there is such a button" do
@ -424,7 +424,7 @@ describe Capybara::RSpecMatchers do
let(:html) { '<p><label>Text field<input type="text"/></label></p>' }
it "gives proper description" do
have_field('Text field').description.should == "has field \"Text field\""
have_field('Text field').description.should == "have field \"Text field\""
end
it "passes if there is such a field" do
@ -445,7 +445,7 @@ describe Capybara::RSpecMatchers do
end
it "gives proper description" do
have_checked_field('it is checked').description.should == "has checked_field \"it is checked\""
have_checked_field('it is checked').description.should == "have checked_field \"it is checked\""
end
context "with should" do
@ -490,7 +490,7 @@ describe Capybara::RSpecMatchers do
end
it "gives proper description" do
have_unchecked_field('unchecked field').description.should == "has unchecked_field \"unchecked field\""
have_unchecked_field('unchecked field').description.should == "have unchecked_field \"unchecked field\""
end
context "with should" do
@ -532,7 +532,7 @@ describe Capybara::RSpecMatchers do
let(:html) { '<label>Select Box<select></select></label>' }
it "gives proper description" do
have_select('Select Box').description.should == "has select \"Select Box\""
have_select('Select Box').description.should == "have select \"Select Box\""
end
it "passes if there is such a select" do
@ -550,7 +550,7 @@ describe Capybara::RSpecMatchers do
let(:html) { '<table><caption>Lovely table</caption></table>' }
it "gives proper description" do
have_table('Lovely table').description.should == "has table \"Lovely table\""
have_table('Lovely table').description.should == "have table \"Lovely table\""
end
it "passes if there is such a select" do