Sha256: efad76d5e51b966a374bbcdb89b88d1c684e9c2425d9f31d91796be7481fb56a

Contents?: true

Size: 477 Bytes

Versions: 83

Compression:

Stored size: 477 Bytes

Contents

require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper'
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes'

describe "Numeric#round" do  
  before(:each) do
    @obj = NumericSub.new
  end
  
  it "converts self to a Float (using #to_f) and returns the #round'ed result" do
    @obj.should_receive(:to_f).and_return(2 - TOLERANCE, TOLERANCE - 2)
    @obj.round.should == 2
    @obj.round.should == -2
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-1.4.2 spec/framework_spec/app/spec/core/numeric/round_spec.rb
rhodes-1.4.1 spec/framework_spec/app/spec/core/numeric/round_spec.rb
rhodes-1.4.0 spec/framework_spec/app/spec/core/numeric/round_spec.rb