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 all commits
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
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
Loading