From 025f7297fac62d7d4ad465fec983484a153ec78d Mon Sep 17 00:00:00 2001 From: Russell Shurts Date: Thu, 5 Jul 2012 19:09:28 -0500 Subject: [PATCH] Change RSpec descriptions from should has to should have --- lib/capybara/rspec/matchers.rb | 4 ++-- spec/rspec/matchers_spec.rb | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/capybara/rspec/matchers.rb b/lib/capybara/rspec/matchers.rb index 04bca4af..df5950f8 100644 --- a/lib/capybara/rspec/matchers.rb +++ b/lib/capybara/rspec/matchers.rb @@ -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 diff --git a/spec/rspec/matchers_spec.rb b/spec/rspec/matchers_spec.rb index ccc0acea..4cccc346 100644 --- a/spec/rspec/matchers_spec.rb +++ b/spec/rspec/matchers_spec.rb @@ -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') "

Text

".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) { 'Just a link' } 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) { '' } 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) { '

' } 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) { '' } 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) { '
Lovely 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