File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed
lib/ruby_event_store/rspec
spec/ruby_event_store/rspec Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def in_stream(stream_name)
3030 self
3131 end
3232
33- def in_streams ( * stream_names )
34- @stream_names = stream_names . flatten
33+ def in_streams ( stream_names )
34+ @stream_names = Array ( stream_names )
3535 self
3636 end
3737
Original file line number Diff line number Diff line change @@ -127,14 +127,7 @@ def phraser
127127 event_store . publish ( event = FooEvent . new , stream_name : "Foo" )
128128 event_store . link ( event . event_id , stream_name : "Bar" )
129129
130- expect ( event_store ) . to matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( "Foo" , "Bar" )
131- end
132-
133- specify do
134- event_store . publish ( event = FooEvent . new , stream_name : "Foo" )
135- event_store . link ( event . event_id , stream_name : "Bar" )
136-
137- expect ( event_store ) . to matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( "Foo" , "Bar" )
130+ expect ( event_store ) . to matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( [ "Foo" , "Bar" ] )
138131 end
139132
140133 specify do
@@ -147,7 +140,7 @@ def phraser
147140 specify do
148141 event_store . publish ( FooEvent . new , stream_name : "Foo" )
149142
150- expect ( event_store ) . not_to matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( "Foo" , "Bar" )
143+ expect ( event_store ) . not_to matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( [ "Foo" , "Bar" ] )
151144 end
152145
153146 specify do
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ def failure_message_formatter
343343
344344 specify do
345345 event_store . publish ( FooEvent . new , stream_name : "Foo" )
346- matcher_ = matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( "Foo" , "Bar" )
346+ matcher_ = matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( [ "Foo" , "Bar" ] )
347347 matcher_ . matches? ( event_store )
348348
349349 expect ( matcher_ . failure_message . to_s ) . to eq ( <<~EOS )
@@ -359,7 +359,7 @@ def failure_message_formatter
359359
360360 specify do
361361 event_store . publish ( FooEvent . new , stream_name : "Bar" )
362- matcher_ = matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( "Foo" , "Bar" )
362+ matcher_ = matcher ( matchers . an_event ( FooEvent ) ) . in_streams ( [ "Foo" , "Bar" ] )
363363 matcher_ . matches? ( event_store )
364364
365365 expect ( matcher_ . failure_message . to_s ) . to eq ( <<~EOS )
You can’t perform that action at this time.
0 commit comments