Sha256: 16fec76c94a376d425871762be0a7ca0b45f0938c0cbab40b9350057251e63dc

Contents?: true

Size: 346 Bytes

Versions: 10

Compression:

Stored size: 346 Bytes

Contents

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

describe Array do
  
  subject { [1, 'cm'] }
  
  it {should be_kind_of Array}
  it {should respond_to :to_unit}
  
  specify { subject.to_unit.should be_instance_of Unit}
  specify { subject.to_unit.should == "1 cm".to_unit }
  specify { subject.to_unit('mm').should == "10 mm".to_unit}
  
end

Version data entries

10 entries across 10 versions & 2 rubygems

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