mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge branch 'master' of git://github.com/rshurts/capybara into rshurts-master
Conflicts: lib/capybara/rspec/matchers.rb spec/rspec/matchers_spec.rb
This commit is contained in:
commit
555aeebd89
2 changed files with 14 additions and 14 deletions
|
@ -14,7 +14,7 @@ module Capybara
|
|||
end
|
||||
|
||||
def description
|
||||
"has #{query.description}"
|
||||
"have #{query.description}"
|
||||
end
|
||||
|
||||
def wrap(actual)
|
||||
|
@ -56,7 +56,7 @@ module Capybara
|
|||
end
|
||||
|
||||
def description
|
||||
"has text #{text.inspect}"
|
||||
"have text #{text.inspect}"
|
||||
end
|
||||
|
||||
def wrap(actual)
|
||||
|
|
|
@ -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
|
||||
|
@ -222,7 +222,7 @@ describe Capybara::RSpecMatchers do
|
|||
|
||||
describe "have_content matcher" do
|
||||
it "gives proper description" do
|
||||
have_content('Text').description.should == "has text \"Text\""
|
||||
have_content('Text').description.should == "have text \"Text\""
|
||||
end
|
||||
|
||||
context "on a string" do
|
||||
|
@ -294,7 +294,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
|
||||
|
@ -368,7 +368,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
|
||||
|
@ -386,7 +386,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
|
||||
|
@ -404,7 +404,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
|
||||
|
@ -425,7 +425,7 @@ describe Capybara::RSpecMatchers do
|
|||
end
|
||||
|
||||
it "gives proper description" do
|
||||
have_checked_field('it is checked').description.should == "has field \"it is checked\""
|
||||
have_checked_field('it is checked').description.should == "have field \"it is checked\""
|
||||
end
|
||||
|
||||
context "with should" do
|
||||
|
@ -470,7 +470,7 @@ describe Capybara::RSpecMatchers do
|
|||
end
|
||||
|
||||
it "gives proper description" do
|
||||
have_unchecked_field('unchecked field').description.should == "has field \"unchecked field\""
|
||||
have_unchecked_field('unchecked field').description.should == "have field \"unchecked field\""
|
||||
end
|
||||
|
||||
context "with should" do
|
||||
|
@ -512,7 +512,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 box \"Select Box\""
|
||||
have_select('Select Box').description.should == "have select box \"Select Box\""
|
||||
end
|
||||
|
||||
it "passes if there is such a select" do
|
||||
|
@ -530,7 +530,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
|
||||
|
|
Loading…
Add table
Reference in a new issue