Sha256: 572d148947f9cdff6dd390371ec04c0e2c9bf042e30c33883ea9dc0712e6faed
Contents?: true
Size: 568 Bytes
Versions: 83
Compression:
Stored size: 568 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Numeric#div" do before(:each) do @obj = NumericSub.new end it "calls self#/ with other, converts the result to a Float (using #to_f) and returns the #floor'ed result" do result = mock("Numeric#div result") result.should_receive(:to_f).and_return(13 - TOLERANCE) @obj.should_receive(:/).with(10).and_return(result) @obj.div(10).should == 12 end end
Version data entries
83 entries across 83 versions & 1 rubygems