Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trying to fix up specs for multi-rubies.

  • Loading branch information...
commit 9192a26828e0dd4fd0a7058f70cbd8a031e22f1f 1 parent 82046d1
Michael Bleigh authored
Showing with 10 additions and 18 deletions.
  1. +1 −0  Gemfile.lock
  2. +9 −17 spec/hashie/mash_spec.rb
  3. +0 −1  spec/spec_helper.rb
View
1  Gemfile.lock
@@ -23,6 +23,7 @@ GEM
thor (0.14.6)
PLATFORMS
+ java
ruby
DEPENDENCIES
View
26 spec/hashie/mash_spec.rb
@@ -226,14 +226,16 @@ class SubMash < Hashie::Mash
Hashie::Mash.new(:abc => 'def').should be_respond_to(:abc)
end
- it "should delegate properly using delegate library" do
- class MashDelegate < DelegateClass(Hashie::Mash)
+ unless defined?(JRUBY_VERSION)
+ it "should delegate properly using delegate library" do
+ class MashDelegate < DelegateClass(Hashie::Mash)
+ end
+
+ delegate = MashDelegate.new(Hashie::Mash.new(:foo => 100))
+ delegate.foo.should == 100
+ delegate.should respond_to(:foo)
+ expect { delegate.bar }.to raise_error(NoMethodError)
end
-
- delegate = MashDelegate.new(Hashie::Mash.new(:foo => 100))
- delegate.foo.should == 100
- delegate.should respond_to(:foo)
- expect { delegate.bar }.to raise_error(NoMethodError)
end
end
@@ -275,15 +277,5 @@ class MashDelegate < DelegateClass(Hashie::Mash)
initial.test.should == []
initial.test?.should be_true
end
-
- describe "to_json" do
-
- it "should render to_json" do
- @mash.foo = :bar
- @mash.bar = {"homer" => "simpson"}
- expected = {"foo" => "bar", "bar" => {"homer" => "simpson"}}
- JSON.parse(@mash.to_json).should == expected
- end
- end
end
end
View
1  spec/spec_helper.rb
@@ -1,5 +1,4 @@
require 'rubygems'
-require 'json'
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
Please sign in to comment.
Something went wrong with that request. Please try again.