spec/async/container/shared_examples.rb in async-container-0.12.0 vs spec/async/container/shared_examples.rb in async-container-0.13.0

- old
+ new

@@ -19,9 +19,21 @@ # THE SOFTWARE. require 'async/rspec/reactor' RSpec.shared_examples_for Async::Container do + it "can attach terminator" do + terminated = false + + subject.attach do + terminated = true + end + + subject.stop + + expect(terminated).to be_truthy + end + it "can run concurrently" do input, output = IO.pipe subject.async do output.write "Hello World"