Skip to content

Commit

Permalink
Merge pull request #1569 from p-linnane/fix-various-typos
Browse files Browse the repository at this point in the history
various: fix miscellaneous typos
  • Loading branch information
JonRowe committed Feb 16, 2024
2 parents 8bf8238 + 96088fb commit 9c31173
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/rspec/mocks/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def verify_partial_doubles?
end

# @private
# Used to track wether we are temporarily suppressing verifying partial
# Used to track whether we are temporarily suppressing verifying partial
# doubles with `without_partial_double_verification { ... }`
attr_accessor :temporarily_suppress_partial_double_verification

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/mocks/message_expectation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def and_return(first_value, *values)
#
# allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }, -> { raise ApiTimeout }, -> { :a_foo })
# api.get_foo # => raises ApiTimeout
# api.get_foo # => rasies ApiTimeout
# api.get_foo # => raises ApiTimeout
# api.get_foo # => :a_foo
# api.get_foo # => :a_foo
# api.get_foo # => :a_foo
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/mocks/once_counts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module Mocks
# call with these args), but currently it fails with a confusing
# message on verification, and ultimately we care more about
# what the message is than when it is raised. Still, it would be
# preferrable for the error to be triggered on the first line,
# preferable for the error to be triggered on the first line,
# so it'd be good to update this spec to enforce that once we
# get the failure message right.
@double.do_something(:args, 1)
Expand Down
8 changes: 4 additions & 4 deletions spec/rspec/mocks/partial_double_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def defined_private_method
expect(object.send(:defined_private_method)).to eq("works")
end

it 'can be temporarily supressed' do
it 'can be temporarily suppressed' do
without_partial_double_verification do
expect(object).to receive(:fictitious_method) { 'works' }
expect_any_instance_of(klass).to receive(:other_fictitious_method) { 'works' }
Expand All @@ -395,7 +395,7 @@ def defined_private_method
}.to raise_error RSpec::Mocks::MockExpectationError
end

it 'can be temporarily supressed and nested' do
it 'can be temporarily suppressed and nested' do
without_partial_double_verification do
without_partial_double_verification do
expect(object).to receive(:fictitious_method) { 'works' }
Expand All @@ -410,7 +410,7 @@ def defined_private_method
}.to raise_error RSpec::Mocks::MockExpectationError
end

specify 'temporarily supressing partial doubles does not affect normal verifying doubles' do
specify 'temporarily suppressing partial doubles does not affect normal verifying doubles' do
without_partial_double_verification do
expect {
instance_double(Class.new, :fictitious_method => 'works')
Expand Down Expand Up @@ -471,7 +471,7 @@ def defined_private_method
)
end

it 'can be temporarily supressed' do
it 'can be temporarily suppressed' do
without_partial_double_verification do
expect(subclass).to receive(:fictitious_method) { 'works' }
end
Expand Down
4 changes: 2 additions & 2 deletions spec/rspec/mocks/stubbed_message_expectations_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RSpec.describe "expection set on previously stubbed method" do
RSpec.describe "expectation set on previously stubbed method" do
it "fails if message is not received after expectation is set" do
dbl = double(:msg => nil)
dbl.msg
Expand Down Expand Up @@ -40,7 +40,7 @@
verify dbl
end

it 'indicates the site of expectation in the stacktrace when outputing arguments of similar calls' do
it 'indicates the site of expectation in the stacktrace when outputting arguments of similar calls' do
dbl = double('double', :foo => true)
expect(dbl).to receive(:foo).with('first'); line = __LINE__

Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/mocks/twice_counts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module Mocks
# call with these args), but currently it fails with a confusing
# message on verification, and ultimately we care more about
# what the message is than when it is raised. Still, it would be
# preferrable for the error to be triggered on the first line,
# preferable for the error to be triggered on the first line,
# so it'd be good to update this spec to enforce that once we
# get the failure message right.
@double.do_something(:args, 1)
Expand Down

0 comments on commit 9c31173

Please sign in to comment.