spec/teaspoon/coverage_spec.rb in teaspoon-0.7.4 vs spec/teaspoon/coverage_spec.rb in teaspoon-0.7.5
- old
+ new
@@ -17,10 +17,10 @@
Dir.stub(:mktmpdir).and_yield(path)
@output = File.join(path, "coverage.json")
end
it "writes the data to a file" do
- file = mock('file')
+ file = double('file')
File.should_receive(:open).with(@output, "w").and_yield(file)
file.should_receive(:write).with('{"foo":"bar"}')
subject.reports
end