spec/utils_spec.rb in ricardochimal-taps-0.2.9 vs spec/utils_spec.rb in ricardochimal-taps-0.2.12
- old
+ new
@@ -39,7 +39,11 @@
Taps::Utils.calculate_chunksize(1000) { }.should == 1100
Time.stubs(:now).returns(10.0).returns(11.1)
Taps::Utils.calculate_chunksize(1000) { }.should == 1100
end
+
+ it "will reset the chunksize to a small value if we got a broken pipe exception" do
+ Taps::Utils.calculate_chunksize(1000) { |c| raise Errno::EPIPE if c == 1000; c.should == 100 }.should == 200
+ end
end