1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/unit/event_with_keyword_arguments_spec.rb
pocari 018c3a9ec9
Fixed an error in Ruby 3 when specifying a method that takes keyword arguments, such as event's before hook. (#777)
* Reproduction case added

* Allow keyword arguments to be passed to event before, etc. in Ruby 2.7.1 and above.

* refactoring
2022-04-14 23:31:56 +05:30

10 lines
336 B
Ruby

require 'spec_helper'
describe EventWithKeywordArguments do
let(:example) { EventWithKeywordArguments.new }
describe 'enable keyword arguments' do
it 'should be executed correctly that method registered by "before hooks" for events with keyword arguments.' do
expect(example.close(key: 1)).to be_truthy
end
end
end