features/step_definitions/output.rb in rung-0.0.1.pre.alpha vs features/step_definitions/output.rb in rung-0.1

- old
+ new

@@ -1,10 +1,15 @@ Before do - allow_any_instance_of(Object).to receive(:print_to_output) do |_receiver, output| - @stored_output ||= "" + allow_any_instance_of(Object) + .to receive(:print_to_output) do |_receiver, output| + @stored_output ||= '' @stored_output << output end end -Then("I see output") do |string| +Then('I see output') do |string| expect(@stored_output).to eq string +end + +Then('I clear output') do + @stored_output = '' end