Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit a692dd4

Browse files
committed
Remove errant check for kw args which are now universally supported
1 parent 82b5584 commit a692dd4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

spec/rspec/mocks/partial_double_spec.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,10 @@ def call(name)
8181
expect(object.foobar(:key => "value")).to equal(1)
8282
end
8383

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

9590
it "can create a positive message expectation" do

0 commit comments

Comments
 (0)