Sha256: dcd6ed0ade67b8025c85c3a04bd8ebc0f0c73eefd2fbfb20d6cde7fc9a283266
Contents?: true
Size: 891 Bytes
Versions: 1
Compression:
Stored size: 891 Bytes
Contents
require 'spec_helper' describe Serializable::Versions do it '#find_version should find a Version equal or less than the Version given ' do version_strings_unordered = ['1.20.0', '1.0.2', '1.0.0', '1.4.0', '1.0.1', '2', '1.0.10', '2.0.1', '1.0'] versions = Serializable::Versions.new version_strings_unordered.each do |s| versions << Serializable::Version.new(s) end versions.push(Serializable::Version.new('1.3')) # Hmm.. versions.find_version(Serializable::Version.new('1.30')).should == Serializable::Version.new('1.20.0') versions.find_version(Serializable::Version.new('1.15')).should == Serializable::Version.new('1.4.0') versions.find_version(Serializable::Version.new('1.0.2')).should == Serializable::Version.new('1.0.2') versions.find_version(Serializable::Version.new('3.1.5')).should == Serializable::Version.new('2.0.1') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_serializable-0.3.0 | spec/versions_spec.rb |