Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.1.1 specs

  • Loading branch information...
commit 3778c900e0640e8bf186c57d3a9d9a79981224c7 1 parent c8d2d46
@RyanScottLewis RyanScottLewis authored
View
11 spec/spec_helper.rb
@@ -0,0 +1,11 @@
+require 'pathname'
+
+__LIB__ = Pathname.new(__FILE__).join('..', '..', 'lib').expand_path
+$:.unshift(__LIB__.to_s) unless $:.include?(__LIB__.to_s)
+
+require 'system'
+require 'bundler/setup'
+
+Bundler.require(:development)
+
+Dir[ Pathname.new(__FILE__).join('..', 'support', '**', '*').expand_path ].each { |filename| require filename }
View
35 spec/system/backwards_compatibility_spec.rb
@@ -0,0 +1,35 @@
+require 'spec_helper'
+
+describe HostSystem do
+ subject { HostSystem } # Use the Class instead of an instance
+ it { should == System }
+end
+
+describe System do
+ subject { System } # Use the Class instead of an instance
+
+ describe '.os' do
+ it 'should delegate to System::OS.name' do
+ System::OS.should_receive(:name).and_return(:mock_response)
+
+ System.os.should == :mock_response
+ end
+ end
+
+ describe '.java?' do
+ it 'should delegate to System::Ruby.java?' do
+ System::Ruby.should_receive(:java?).and_return(:mock_response)
+
+ System.java?.should == :mock_response
+ end
+ end
+
+ describe '.jruby?' do
+ it 'should delegate to System::Ruby.jruby?' do
+ System::Ruby.should_receive(:jruby?).and_return(:mock_response)
+
+ System.jruby?.should == :mock_response
+ end
+ end
+
+end
View
8 spec/system/version_spec.rb
@@ -0,0 +1,8 @@
+require 'spec_helper'
+
+describe System do
+ subject { System::VERSION }
+
+ it { should == Pathname.new(__FILE__).join('..', '..', '..', 'VERSION').read.strip }
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.