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

Version Path
rhodes-3.0.0.beta.6 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-3.0.0.beta.5 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-3.0.0.beta.4 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-3.0.0.beta.3 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-3.0.0.beta.2 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-3.0.0.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.4.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.4.1.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.4.0 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.4.0.beta.2 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.4.0.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.2 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.2.beta.2 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.2.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.1.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.0 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.0.beta.3 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.0.beta.2 spec/framework_spec/app/spec/core/numeric/div_spec.rb
rhodes-2.3.0.beta.1 spec/framework_spec/app/spec/core/numeric/div_spec.rb