Skip to content

Commit bb4c6e2

Browse files
committed
Copy event subscriber from master
1 parent 94b13c7 commit bb4c6e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/support/event_subscriber.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ def started(event)
4444
end
4545
end
4646

47+
# Filters command started events for the specified command name.
48+
def command_started_events(command_name)
49+
started_events.select do |event|
50+
event.command[command_name]
51+
end
52+
end
53+
4754
# Locates command stated events for the specified command name,
4855
# asserts that there is exactly one such event, and returns it.
4956
def single_command_started_event(command_name)

0 commit comments

Comments
 (0)