Sha256: 60f17e5d9f4fcce82cb79ab7be00f5e9a076f48273dd4d92f64f7efdcef98f41

Contents?: true

Size: 290 Bytes

Versions: 9

Compression:

Stored size: 290 Bytes

Contents

require 'spec_helper'

describe Virtus::Coercion::Numeric, '.to_string' do
  subject { object.to_string(numeric) }

  let(:object)  { described_class }
  let(:numeric) { Rational(2, 2)  }

  let(:coerced_value) { RUBY_VERSION < '1.9' ? '1' : '1/1' }

  it { should eql(coerced_value) }
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
virtus-0.5.5 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.5.4 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.5.3 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.5.2 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.5.1 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.5.0 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.4.2 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb
virtus-0.4.1 spec/unit/virtus/coercion/numeric/class_methods/to_string_spec.rb