Skip to content

Commit

Permalink
Remove errant check for kw args which are now universally supported
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Feb 18, 2021
1 parent 82b5584 commit a692dd4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions spec/rspec/mocks/partial_double_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,10 @@ def call(name)
expect(object.foobar(:key => "value")).to equal(1)
end

if RSpec::Support::RubyFeatures.required_kw_args_supported?
# Use eval to avoid syntax error on 1.8 and 1.9
binding.eval(<<-CODE, __FILE__, __LINE__)
it "can accept an inner hash as a message argument" do
hash = {:a => {:key => "value"}}
expect(object).to receive(:foobar).with(:key => "value").and_return(1)
expect(object.foobar(**hash[:a])).to equal(1)
end
CODE
it "can accept an inner hash as a message argument" do
hash = {:a => {:key => "value"}}
expect(object).to receive(:foobar).with(:key => "value").and_return(1)
expect(object.foobar(**hash[:a])).to equal(1)
end

it "can create a positive message expectation" do
Expand Down

0 comments on commit a692dd4

Please sign in to comment.