summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/guards/support_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mspec/spec/guards/support_spec.rb')
-rw-r--r--spec/mspec/spec/guards/support_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/mspec/spec/guards/support_spec.rb b/spec/mspec/spec/guards/support_spec.rb
index 43a7e76f06..f899ad02f6 100644
--- a/spec/mspec/spec/guards/support_spec.rb
+++ b/spec/mspec/spec/guards/support_spec.rb
@@ -5,15 +5,15 @@ describe Object, "#not_supported_on" do
before :all do
@verbose = $VERBOSE
$VERBOSE = nil
- @ruby_name = Object.const_get :RUBY_NAME if Object.const_defined? :RUBY_NAME
+ @ruby_engine = Object.const_get :RUBY_ENGINE if Object.const_defined? :RUBY_ENGINE
end
after :all do
$VERBOSE = @verbose
- if @ruby_name
- Object.const_set :RUBY_NAME, @ruby_name
+ if @ruby_engine
+ Object.const_set :RUBY_ENGINE, @ruby_engine
else
- Object.send :remove_const, :RUBY_NAME
+ Object.send :remove_const, :RUBY_ENGINE
end
end
@@ -22,7 +22,7 @@ describe Object, "#not_supported_on" do
end
it "raises an Exception when passed :ruby" do
- Object.const_set :RUBY_NAME, "jruby"
+ Object.const_set :RUBY_ENGINE, "jruby"
lambda {
not_supported_on(:ruby) { ScratchPad.record :yield }
}.should raise_error(Exception)
@@ -30,19 +30,19 @@ describe Object, "#not_supported_on" do
end
it "does not yield when #implementation? returns true" do
- Object.const_set :RUBY_NAME, "jruby"
+ Object.const_set :RUBY_ENGINE, "jruby"
not_supported_on(:jruby) { ScratchPad.record :yield }
ScratchPad.recorded.should_not == :yield
end
it "yields when #standard? returns true" do
- Object.const_set :RUBY_NAME, "ruby"
+ Object.const_set :RUBY_ENGINE, "ruby"
not_supported_on(:rubinius) { ScratchPad.record :yield }
ScratchPad.recorded.should == :yield
end
it "yields when #implementation? returns false" do
- Object.const_set :RUBY_NAME, "jruby"
+ Object.const_set :RUBY_ENGINE, "jruby"
not_supported_on(:rubinius) { ScratchPad.record :yield }
ScratchPad.recorded.should == :yield
end