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

Commit ef69fe0

Browse files
committed
Remove kw args check
1 parent 9602aed commit ef69fe0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

spec/rspec/mocks/and_call_original_spec.rb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,10 @@ class << self
185185
expect(klazz.alternate_new).to be_an_instance_of(klazz)
186186
end
187187

188-
if RSpec::Support::RubyFeatures.kw_args_supported?
189-
binding.eval(<<-CODE, __FILE__, __LINE__)
190-
it "works for methods that accept keyword arguments" do
191-
def instance.foo(bar: nil); bar; end
192-
expect(instance).to receive(:foo).and_call_original
193-
expect(instance.foo(bar: "baz")).to eq("baz")
194-
end
195-
CODE
188+
it "works for methods that accept keyword arguments" do
189+
def instance.foo(bar: nil); bar; end
190+
expect(instance).to receive(:foo).and_call_original
191+
expect(instance.foo(bar: "baz")).to eq("baz")
196192
end
197193

198194
context 'on an object that defines method_missing' do

0 commit comments

Comments
 (0)