Sha256: f0fdbd9868cbb65d1b9c9aa098ed729c90b9cfe515208f3c05e6c9a4e4467084

Contents?: true

Size: 484 Bytes

Versions: 6

Compression:

Stored size: 484 Bytes

Contents

require 'spec_helper'
require 'taza/entity'
require 'extensions/hash'

# This is too tightly coupled to Taza::Entity
describe 'Hash Extensions' do
  it "should add methods for hash keys to some instance" do
    entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
    entity.should respond_to(:apple)
  end
  it "should not add the methods to a hash" do
    entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
    entity.should_not be_a_instance_of(Hash)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
taza-0.9.2.1 spec/taza/hash_spec.rb
taza-0.9.2.0 spec/taza/hash_spec.rb
taza-0.9.1.2 spec/hash_spec.rb
taza-0.9.1.1 spec/hash_spec.rb
taza-0.9.1 spec/hash_spec.rb
taza-0.9.0 spec/hash_spec.rb