Permalink
Browse files

Remove 'should' from example docstrings

- Closes #11.
  • Loading branch information...
1 parent 2d7bc36 commit 20194cf0fdaaf916b55a33fcc237f705e27f559a @justinko justinko committed with dchelimsky Aug 14, 2010
Showing with 273 additions and 273 deletions.
  1. +4 −4 spec/rspec/mocks/any_number_of_times_spec.rb
  2. +2 −2 spec/rspec/mocks/argument_expectation_spec.rb
  3. +11 −11 spec/rspec/mocks/at_least_spec.rb
  4. +11 −11 spec/rspec/mocks/at_most_spec.rb
  5. +1 −1 spec/rspec/mocks/bug_report_10260_spec.rb
  6. +3 −3 spec/rspec/mocks/bug_report_11545_spec.rb
  7. +2 −2 spec/rspec/mocks/bug_report_15719_spec.rb
  8. +2 −2 spec/rspec/mocks/bug_report_600_spec.rb
  9. +1 −1 spec/rspec/mocks/bug_report_7611_spec.rb
  10. +2 −2 spec/rspec/mocks/bug_report_8165_spec.rb
  11. +2 −2 spec/rspec/mocks/bug_report_957_spec.rb
  12. +12 −12 spec/rspec/mocks/failing_argument_matchers_spec.rb
  13. +18 −18 spec/rspec/mocks/hash_including_matcher_spec.rb
  14. +13 −13 spec/rspec/mocks/hash_not_including_matcher_spec.rb
  15. +7 −7 spec/rspec/mocks/mock_ordering_spec.rb
  16. +4 −4 spec/rspec/mocks/mock_space_spec.rb
  17. +65 −65 spec/rspec/mocks/mock_spec.rb
  18. +11 −11 spec/rspec/mocks/multiple_return_value_spec.rb
  19. +4 −4 spec/rspec/mocks/nil_expectation_warning_spec.rb
  20. +7 −7 spec/rspec/mocks/null_object_mock_spec.rb
  21. +6 −6 spec/rspec/mocks/once_counts_spec.rb
  22. +3 −3 spec/rspec/mocks/options_hash_spec.rb
  23. +17 −17 spec/rspec/mocks/partial_mock_spec.rb
  24. +1 −1 spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb
  25. +20 −20 spec/rspec/mocks/passing_argument_matchers_spec.rb
  26. +5 −5 spec/rspec/mocks/precise_counts_spec.rb
  27. +4 −4 spec/rspec/mocks/record_messages_spec.rb
  28. +1 −1 spec/rspec/mocks/stash_spec.rb
  29. +4 −4 spec/rspec/mocks/stub_implementation_spec.rb
  30. +26 −26 spec/rspec/mocks/stub_spec.rb
  31. +2 −2 spec/spec_helper.rb
  32. +2 −2 spec/support/macros.rb
@@ -8,23 +8,23 @@ module Mocks
@mock = RSpec::Mocks::Mock.new("test mock")
end
- it "should pass if any number of times method is called many times" do
+ it "passes if any number of times method is called many times" do
@mock.should_receive(:random_call).any_number_of_times
(1..10).each do
@mock.random_call
end
end
- it "should pass if any number of times method is called once" do
+ it "passes if any number of times method is called once" do
@mock.should_receive(:random_call).any_number_of_times
@mock.random_call
end
- it "should pass if any number of times method is not called" do
+ it "passes if any number of times method is not called" do
@mock.should_receive(:random_call).any_number_of_times
end
- it "should return the mocked value when called after a similar stub" do
+ it "returns the mocked value when called after a similar stub" do
@mock.stub(:message).and_return :stub_value
@mock.should_receive(:message).any_number_of_times.and_return(:mock_value)
@mock.message.should == :mock_value
@@ -3,15 +3,15 @@
module RSpec
module Mocks
describe ArgumentExpectation do
- it "should consider an object that responds to #matches? and #description to be a matcher" do
+ it "considers an object that responds to #matches? and #description to be a matcher" do
argument_expecatation = RSpec::Mocks::ArgumentExpectation.new
obj = double("matcher")
obj.should_receive(:respond_to?).with(:matches?).and_return(true)
obj.should_receive(:respond_to?).with(:description).and_return(true)
argument_expecatation.is_matcher?(obj).should be_true
end
- it "should NOT consider an object that only responds to #matches? to be a matcher" do
+ it "does NOT consider an object that only responds to #matches? to be a matcher" do
argument_expecatation = RSpec::Mocks::ArgumentExpectation.new
obj = double("matcher")
obj.should_receive(:respond_to?).with(:matches?).and_return(true)
@@ -7,14 +7,14 @@ module Mocks
@mock = RSpec::Mocks::Mock.new("test mock")
end
- it "should fail if method is never called" do
+ it "fails if method is never called" do
@mock.should_receive(:random_call).at_least(4).times
lambda do
@mock.rspec_verify
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when called less than n times" do
+ it "fails when called less than n times" do
@mock.should_receive(:random_call).at_least(4).times
@mock.random_call
@mock.random_call
@@ -24,29 +24,29 @@ module Mocks
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when at least once method is never called" do
+ it "fails when at least once method is never called" do
@mock.should_receive(:random_call).at_least(:once)
lambda do
@mock.rspec_verify
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when at least twice method is called once" do
+ it "fails when at least twice method is called once" do
@mock.should_receive(:random_call).at_least(:twice)
@mock.random_call
lambda do
@mock.rspec_verify
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when at least twice method is never called" do
+ it "fails when at least twice method is never called" do
@mock.should_receive(:random_call).at_least(:twice)
lambda do
@mock.rspec_verify
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should pass when at least n times method is called exactly n times" do
+ it "passes when at least n times method is called exactly n times" do
@mock.should_receive(:random_call).at_least(4).times
@mock.random_call
@mock.random_call
@@ -55,7 +55,7 @@ module Mocks
@mock.rspec_verify
end
- it "should pass when at least n times method is called n plus 1 times" do
+ it "passes when at least n times method is called n plus 1 times" do
@mock.should_receive(:random_call).at_least(4).times
@mock.random_call
@mock.random_call
@@ -65,28 +65,28 @@ module Mocks
@mock.rspec_verify
end
- it "should pass when at least once method is called once" do
+ it "passes when at least once method is called once" do
@mock.should_receive(:random_call).at_least(:once)
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at least once method is called twice" do
+ it "passes when at least once method is called twice" do
@mock.should_receive(:random_call).at_least(:once)
@mock.random_call
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at least twice method is called three times" do
+ it "passes when at least twice method is called three times" do
@mock.should_receive(:random_call).at_least(:twice)
@mock.random_call
@mock.random_call
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at least twice method is called twice" do
+ it "passes when at least twice method is called twice" do
@mock.should_receive(:random_call).at_least(:twice)
@mock.random_call
@mock.random_call
@@ -7,7 +7,7 @@ module Mocks
@mock = RSpec::Mocks::Mock.new("test mock")
end
- it "should fail when at most n times method is called n plus 1 times" do
+ it "fails when at most n times method is called n plus 1 times" do
@mock.should_receive(:random_call).at_most(4).times
@mock.random_call
@mock.random_call
@@ -19,7 +19,7 @@ module Mocks
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when at most once method is called twice" do
+ it "fails when at most once method is called twice" do
@mock.should_receive(:random_call).at_most(:once)
@mock.random_call
@mock.random_call
@@ -28,7 +28,7 @@ module Mocks
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should fail when at most twice method is called three times" do
+ it "fails when at most twice method is called three times" do
@mock.should_receive(:random_call).at_most(:twice)
@mock.random_call
@mock.random_call
@@ -38,7 +38,7 @@ module Mocks
end.should raise_error(RSpec::Mocks::MockExpectationError)
end
- it "should pass when at most n times method is called exactly n times" do
+ it "passes when at most n times method is called exactly n times" do
@mock.should_receive(:random_call).at_most(4).times
@mock.random_call
@mock.random_call
@@ -47,44 +47,44 @@ module Mocks
@mock.rspec_verify
end
- it "should pass when at most n times method is called less than n times" do
+ it "passes when at most n times method is called less than n times" do
@mock.should_receive(:random_call).at_most(4).times
@mock.random_call
@mock.random_call
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at most n times method is never called" do
+ it "passes when at most n times method is never called" do
@mock.should_receive(:random_call).at_most(4).times
@mock.rspec_verify
end
- it "should pass when at most once method is called once" do
+ it "passes when at most once method is called once" do
@mock.should_receive(:random_call).at_most(:once)
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at most once method is never called" do
+ it "passes when at most once method is never called" do
@mock.should_receive(:random_call).at_most(:once)
@mock.rspec_verify
end
- it "should pass when at most twice method is called once" do
+ it "passes when at most twice method is called once" do
@mock.should_receive(:random_call).at_most(:twice)
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at most twice method is called twice" do
+ it "passes when at most twice method is called twice" do
@mock.should_receive(:random_call).at_most(:twice)
@mock.random_call
@mock.random_call
@mock.rspec_verify
end
- it "should pass when at most twice method is never called" do
+ it "passes when at most twice method is never called" do
@mock.should_receive(:random_call).at_most(:twice)
@mock.rspec_verify
end
@@ -1,7 +1,7 @@
require 'spec_helper'
describe "An RSpec Mock" do
- it "should hide internals in its inspect representation" do
+ it "hides internals in its inspect representation" do
m = double('cup')
m.inspect.should =~ /#<RSpec::Mocks::Mock:0x[a-f0-9.]+ @name="cup">/
end
@@ -15,17 +15,17 @@ def self.respond_to?(sym, incl_private=false)
@liar = LiarLiarPantsOnFire.new
end
- it "should work when object lies about responding to a method" do
+ it "works when object lies about responding to a method" do
@liar.should_receive(:something)
@liar.something
end
- it 'should work when class lies about responding to a method' do
+ it 'works when class lies about responding to a method' do
LiarLiarPantsOnFire.should_receive(:something)
LiarLiarPantsOnFire.something
end
- it 'should cleanup after itself' do
+ it 'cleans up after itself' do
(class << LiarLiarPantsOnFire; self; end).instance_methods.should_not include("something")
end
end
@@ -4,7 +4,7 @@ module RSpec
module Mocks
describe "mock failure" do
- it "should tell you when it receives the right message with the wrong args" do
+ it "tells you when it receives the right message with the wrong args" do
double = double("foo")
double.should_receive(:bar).with("message")
lambda {
@@ -13,7 +13,7 @@ module Mocks
double.rspec_reset # so the example doesn't fail
end
- pending "should tell you when it receives the right message with the wrong args if you stub the method (fix bug 15719)" do
+ pending "tells you when it receives the right message with the wrong args if you stub the method (fix bug 15719)" do
# NOTE - for whatever reason, if you use a the block style of pending here,
# rcov gets unhappy. Don't know why yet.
double = double("foo")
@@ -10,12 +10,12 @@ def self.method_that_uses_define_method
end
end
- it "should work" do
+ it "works" do
ExampleClass.should_receive(:define_method).with("defined_method")
ExampleClass.method_that_uses_define_method
end
- it "should restore the original method" do
+ it "restores the original method" do
ExampleClass.method_that_uses_define_method
end
end
@@ -7,7 +7,7 @@ class Foo
class Bar < Foo
end
- it "should respect subclasses" do
+ it "respects subclasses" do
Foo.stub(:new).and_return(Object.new)
end
@@ -12,15 +12,15 @@
# The fix was to keep track of whether :respond_to? had been proxied and, if
# so, call the munged copy of :respond_to? on the object.
- it "should not raise an exception for Object" do
+ it "does not raise an exception for Object" do
obj = Object.new
obj.should_receive(:respond_to?).with(:foobar).and_return(true)
obj.should_receive(:foobar).and_return(:baz)
obj.respond_to?(:foobar).should be_true
obj.foobar.should == :baz
end
- it "should not raise an exception for mock" do
+ it "does not raise an exception for mock" do
obj = double("obj")
obj.should_receive(:respond_to?).with(:foobar).and_return(true)
obj.should_receive(:foobar).and_return(:baz)
@@ -10,11 +10,11 @@ module Mocks
@base_class.stub(:find).and_return "stubbed_value"
end
- it "should return the value for the stub on the base class" do
+ it "returns the value for the stub on the base class" do
@base_class.find.should == "stubbed_value"
end
- it "should return the value for the descendent class" do
+ it "returns the value for the descendent class" do
@concrete_class.find.should == "stubbed_value"
end
end
Oops, something went wrong.

0 comments on commit 20194cf

Please sign in to comment.