diff --git a/spec/wait_for_spec.rb b/spec/wait_for_spec.rb index 8c9e67d..18e8bac 100644 --- a/spec/wait_for_spec.rb +++ b/spec/wait_for_spec.rb @@ -92,6 +92,12 @@ wait_for { progress }.to raise_error(StandardError) }.to raise_error(RSpec::Expectations::ExpectationNotMetError) end + + it "uses a new matcher instance for each block call" do + expect { + wait_for { progress.chars }.to contain_exactly(".", ".") + }.not_to raise_error + end end describe "not_to" do