From b8343ef963fe691beea8c968d5d3dc969be63e37 Mon Sep 17 00:00:00 2001 From: Tristan Dunn Date: Fri, 17 Dec 2010 12:14:02 -0500 Subject: [PATCH] Remove "should" from example descriptions in a couple of files. --- .../redirect_to_matcher_spec.rb | 14 +++++++------- .../action_mailer/have_sent_email_spec.rb | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/shoulda/action_controller/redirect_to_matcher_spec.rb b/spec/shoulda/action_controller/redirect_to_matcher_spec.rb index b9fda5a2..4eb6b86e 100644 --- a/spec/shoulda/action_controller/redirect_to_matcher_spec.rb +++ b/spec/shoulda/action_controller/redirect_to_matcher_spec.rb @@ -6,34 +6,34 @@ describe Shoulda::Matchers::ActionController::RedirectToMatcher do @controller = build_response { redirect_to '/some/url' } end - it "should accept redirecting to that url" do + it "accepts redirecting to that url" do @controller.should redirect_to('/some/url') end - it "should reject redirecting to a different url" do + it "rejects redirecting to a different url" do @controller.should_not redirect_to('/some/other/url') end - it "should accept redirecting to that url in a block" do + it "accepts redirecting to that url in a block" do @controller.should redirect_to('somewhere') { '/some/url' } end - it "should reject redirecting to a different url in a block" do + it "rejects redirecting to a different url in a block" do @controller.should_not redirect_to('somewhere else') { '/some/other/url' } end end - context "a controller that doesn't redirect" do + context "a controller that doesn't redirect" do before do @controller = build_response { render :text => 'hello' } end - it "should reject redirecting to a url" do + it "rejects redirecting to a url" do @controller.should_not redirect_to('/some/url') end end - it "should use the correct description when provided a block" do + it "provides the correct description when provided a block" do matcher = redirect_to('somewhere else') { '/some/other/url' } matcher.description.should == 'redirect to somewhere else' end diff --git a/spec/shoulda/action_mailer/have_sent_email_spec.rb b/spec/shoulda/action_mailer/have_sent_email_spec.rb index 0023444b..8909fb93 100644 --- a/spec/shoulda/action_mailer/have_sent_email_spec.rb +++ b/spec/shoulda/action_mailer/have_sent_email_spec.rb @@ -20,42 +20,42 @@ describe Shoulda::Matchers::ActionMailer::HaveSentEmailMatcher do after { ::ActionMailer::Base.deliveries.clear } - it "should accept based on the subject" do + it "accepts sent e-mail based on the subject" do should have_sent_email.with_subject(/is spam$/) matcher = have_sent_email.with_subject(/totally safe/) matcher.matches?(nil) matcher.failure_message.should =~ /Expected sent email with subject/ end - it "should accept based on a string sender" do + it "accepts sent e-mail based on a string sender" do should have_sent_email.from('do-not-reply@example.com') matcher = have_sent_email.from('you@example.com') matcher.matches?(nil) matcher.failure_message.should =~ /Expected sent email from/ end - it "should accept based on a regexp sender" do + it "accepts sent e-mail based on a regexp sender" do should have_sent_email.from(/@example\.com/) matcher = have_sent_email.from(/you@/) matcher.matches?(nil) matcher.failure_message.should =~ /Expected sent email from/ end - it "should accept based on the body" do + it "accepts sent e-mail based on the body" do should have_sent_email.with_body(/is spam\./) matcher = have_sent_email.with_body(/totally safe/) matcher.matches?(nil) matcher.failure_message.should =~ /Expected sent email with body/ end - it "should accept based on the recipient" do + it "accept sent e-mail based on the recipient" do should have_sent_email.to('myself@me.com') matcher = have_sent_email.to('you@example.com') matcher.matches?(nil) matcher.failure_message.should =~ /Expected sent email to/ end - it "should list all deliveries within failure message" do + it "lists all the deliveries within failure message" do add_mail_to_deliveries matcher = have_sent_email.to('you@example.com') @@ -63,13 +63,13 @@ describe Shoulda::Matchers::ActionMailer::HaveSentEmailMatcher do matcher.failure_message.should =~ /Deliveries:\n"This is spam" to \["myself@me\.com"\]\n"This is spam" to \["myself@me\.com"\]/ end - it "should chain" do + it "allows chaining" do should have_sent_email.with_subject(/spam/).from('do-not-reply@example.com').with_body(/spam/).to('myself@me.com') should_not have_sent_email.with_subject(/ham/).from('you@example.com').with_body(/ham/).to('them@example.com') end end - it "should provide a detailed description of the e-mail expected to be sent" do + it "provides a detailed description of the e-mail expected to be sent" do matcher = have_sent_email matcher.description.should == 'send an email' matcher = matcher.with_subject("Welcome!")