Sha256: ce3c9718952e7045e6a93a50e12144c650395fcab6a7068b46c7f2bf345b7f80

Contents?: true

Size: 709 Bytes

Versions: 10

Compression:

Stored size: 709 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

# some rubies return an array of strings for .instance_methods and others return an array of symbols
# so let's stringify them before we compare
describe Numeric do
  specify { Float.instance_methods.map {|m| m.to_s}.should include("to_unit") }
  specify { Integer.instance_methods.map {|m| m.to_s}.should include("to_unit") }
  specify { Fixnum.instance_methods.map {|m| m.to_s}.should include("to_unit") }
  specify { Complex.instance_methods.map {|m| m.to_s}.should include("to_unit") }
  specify { Bignum.instance_methods.map {|m| m.to_s}.should include("to_unit") }
  specify { Rational.instance_methods.map {|m| m.to_s}.should include("to_unit") }
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
rails-units-1.7.1 spec/rails-units/numeric_spec.rb
rails-units-1.6.0 spec/rails-units/numeric_spec.rb
ruby-units-1.3.2 spec/ruby-units/numeric_spec.rb
ruby-units-1.3.2.a spec/ruby-units/numeric_spec.rb
rails-units-1.5.2 spec/rails-units/numeric_spec.rb
rails-units-1.5.1 spec/rails-units/numeric_spec.rb
rails-units-1.4.1 spec/ruby-units/numeric_spec.rb
rails-units-1.3.1 spec/ruby-units/numeric_spec.rb
ruby-units-1.3.1 spec/ruby-units/numeric_spec.rb
ruby-units-1.3.0.a spec/ruby-units/numeric_spec.rb