diff options
Diffstat (limited to 'spec/hashie')
-rw-r--r-- | spec/hashie/clash_spec.rb | 2 | ||||
-rw-r--r-- | spec/hashie/dash_spec.rb | 2 | ||||
-rw-r--r-- | spec/hashie/hash_spec.rb | 2 | ||||
-rw-r--r-- | spec/hashie/mash_spec.rb | 12 |
4 files changed, 14 insertions, 4 deletions
diff --git a/spec/hashie/clash_spec.rb b/spec/hashie/clash_spec.rb index 6363d5d..6797a4a 100644 --- a/spec/hashie/clash_spec.rb +++ b/spec/hashie/clash_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Hashie::Clash do before do diff --git a/spec/hashie/dash_spec.rb b/spec/hashie/dash_spec.rb index b7971f9..432e357 100644 --- a/spec/hashie/dash_spec.rb +++ b/spec/hashie/dash_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' class DashTest < Hashie::Dash property :first_name diff --git a/spec/hashie/hash_spec.rb b/spec/hashie/hash_spec.rb index 78d44be..30571d2 100644 --- a/spec/hashie/hash_spec.rb +++ b/spec/hashie/hash_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Hash do it "should be convertible to a Hashie::Mash" do diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb index 70d1f6f..64b30ef 100644 --- a/spec/hashie/mash_spec.rb +++ b/spec/hashie/mash_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../spec_helper' +require 'spec_helper' describe Hashie::Mash do before(:each) do @@ -82,6 +82,16 @@ describe Hashie::Mash do record.son = MyMash.new record.son.class.should == MyMash end + + describe '#respond_to?' do + it 'should respond to a normal method' do + Hashie::Mash.new.should be_respond_to(:key?) + end + + it 'should respond to a set key' do + Hashie::Mash.new(:abc => 'def').should be_respond_to(:abc) + end + end context "#initialize" do it "should convert an existing hash to a Hashie::Mash" do |