spec/unit/test_viiite.rb in viiite-0.1.0 vs spec/unit/test_viiite.rb in viiite-0.2.0

- old
+ new

@@ -1,12 +1,25 @@ require 'spec_helper' describe Viiite do - + it "should have a version number" do Viiite.const_defined?(:VERSION).should be_true end - it "should provide a way to have short ruby descr" do - Viiite.which_ruby.should_not be_empty + it "should provide a way to have a short ruby description" do + { + 'ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]' => 'ruby 1.8.7p334', + 'ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]' => 'ruby 1.8.7p352', + 'ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03' => 'ree 2011.03', + 'ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]' => 'ruby 1.9.2p290', + 'ruby 1.9.3dev (2011-07-31 revision 32789) [x86_64-linux]' => 'ruby 1.9.3dev', + 'ruby 1.9.4dev (2011-08-24 trunk 33047) [x86_64-linux]' => 'ruby 1.9.4dev', + 'rubinius 1.2.5dev (1.8.7 489d5384 yyyy-mm-dd JI) [x86_64-unknown-linux-gnu]' => 'rubinius 1.2.5dev', + 'rubinius 2.0.0dev (1.8.7 d705d318 yyyy-mm-dd JI) [x86_64-unknown-linux-gnu]' => 'rubinius 2.0.0dev', + 'jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]' => 'jruby 1.6.3', + 'jruby 1.7.0.dev (ruby-1.8.7-p330) (2011-08-24 7b9f999) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java]' => 'jruby 1.7.0.dev', + }.each_pair { |description, short| + Viiite.short_ruby_description(description).should == short + } end - + end