Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Be more explicit about what we're expecting.

  • Loading branch information...
commit dc2583902a86f3947464f66751c3beaf51d709d2 1 parent e419061
@gabebw gabebw authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/kumade/cli_spec.rb
View
9 spec/kumade/cli_spec.rb
@@ -70,8 +70,8 @@
end
describe Kumade::CLI, ".swapping_stdout_for" do
- let(:stdout) { $stdout }
- let(:output) { StringIO.new }
+ let!(:stdout) { $stdout }
+ let(:output) { StringIO.new }
before do
stdout.stubs(:print => nil, :puts => nil)
@@ -83,6 +83,7 @@
end
stdout.should have_received(:print).never
+ stdout.should have_received(:puts).never
output.rewind
output.read.should == "Hello, you can't see me.\n"
@@ -94,7 +95,7 @@
raise Kumade::DeploymentError.new("error")
end
- stdout.should have_received(:print)
+ stdout.should have_received(:print).with("Hello, you can see me!\n")
end
context "in print output mode" do
@@ -103,7 +104,7 @@
$stdout.puts "Hello, you can see me!"
end
- stdout.should have_received(:puts)
+ stdout.should have_received(:puts).with("Hello, you can see me!")
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.