Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various: fix miscellaneous typos #1569

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Bug Fixes:
* Remove empty diff marker when a diff only contains console codes. (Jon Rowe, #1506)
* Show keyword vs hash diff marker when arguments are not `==` (Jon Rowe, #1506)
* Change check to detect frozen objects to rescue errors rather than
pre-empting by checking `frozen?` due to some objects mis-behaving.
pre-empting by checking `frozen?` due to some objects misbehaving.
p-linnane marked this conversation as resolved.
Show resolved Hide resolved
(Keegan Roth, #1401)
* Prevent unfulfilled expectations using `expect_any_instance_of` across a class
inheritance boundary from raising rather than failing. (Jon Rowe, #1496)
Expand Down Expand Up @@ -190,7 +190,7 @@ Bug Fixes:
* Issue error when encountering invalid "counted" negative message expectations.
(Sergiy Yarinovskiy, #1212)
* Ensure `allow_any_instance_of` and `expect_any_instance_of` can be temporarily
supressed. (Jon Rowe, #1228)
suppressed. (Jon Rowe, #1228)
* Ensure `expect_any_instance_of(double).to_not have_received(:some_method)`
fails gracefully (as its not supported) rather than issuing a `NoMethodError`.
(Maxim Krizhanovsky, #1231)
Expand Down Expand Up @@ -287,7 +287,7 @@ Bug Fixes:
`allow`. (Andrew Kozin, #1056)
* Prevent stubbing `respond_to?` on partial doubles from causing infinite
recursion. (Jon Rowe, #1013)
* Prevent aliased methods from disapearing after being mocked with
* Prevent aliased methods from disappearing after being mocked with
`any_instance` (regression from #1043). (Joe Rafaniello, #1060)

### 3.4.1 / 2016-01-10
Expand Down Expand Up @@ -368,7 +368,7 @@ Bug Fixes:
for when the message was received the wrong number of times with
the specified args, and also received additional times with other
arguments. Previously it confusingly listed the arguments as being
mis-matched (even when the double was allowed to receive with any
mismatched (even when the double was allowed to receive with any
args) rather than listing the count. (John Ceh, #918)
* Fix `any_args`/`anything` support so that we avoid calling `obj == anything`
on user objects that may have improperly implemented `==` in a way that
Expand Down Expand Up @@ -824,7 +824,7 @@ Deprecations:
Deprecations

* Expecting to use lambdas or other strong arity implementations for stub
methods with mis-matched arity is deprecated and support for them will be
methods with mismatched arity is deprecated and support for them will be
removed in 3.0. Either provide the right amount of arguments or use a weak
arity implementation (methods with splats or procs). (Jon Rowe)
* Using the same test double instance in multiple examples is deprecated. Test
Expand Down Expand Up @@ -898,7 +898,7 @@ Bug Fixes:
double's nullness persisted between examples in earlier examples.
While this is not an intended use case (test doubles are meant to live
for only one example), we don't want to break behavior users rely
on in a minor relase. This will be deprecated in 2.99 and removed
on in a minor release. This will be deprecated in 2.99 and removed
in 3.0. (Myron Marston)

### 2.14.0 / 2013-07-06
Expand Down Expand Up @@ -1023,7 +1023,7 @@ Bug fixes
* Fix `stub_const` with an undefined constnat name to work properly
with constant strings that are prefixed with `::` -- and edge case
I missed in the bug fix in the 2.12.1 release (Myron Marston).
* Ensure method visibility on a partial mock is restored after reseting
* Ensure method visibility on a partial mock is restored after resetting
method stubs, even on a singleton module (created via `extend self`)
when the method visibility differs between the instance and singleton
versions (Andy Lindeman).
Expand Down
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
4 changes: 2 additions & 2 deletions spec/rspec/mocks/verifying_doubles/construction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ module CustomModule

it 'prevents creation of instance doubles for unloaded constants' do
expect {
instance_double('LoadedClas')
instance_double('LoadedClass')
p-linnane marked this conversation as resolved.
Show resolved Hide resolved
}.to raise_error(VerifyingDoubleNotDefinedError)
end

it 'prevents creation of class doubles for unloaded constants' do
expect {
class_double('LoadedClas')
class_double('LoadedClass')
}.to raise_error(VerifyingDoubleNotDefinedError)
end
end
Expand Down
Loading