Sha256: 6fcf36de3280408a373167fde45dca0c130773242a461b009292507c0453d78b

Contents?: true

Size: 538 Bytes

Versions: 12

Compression:

Stored size: 538 Bytes

Contents

describe Musterb::HashExtractor do
  it "can pull values out from a hash" do
    extractor = Musterb::HashExtractor.new({"foo" => "bar"}, nil)
    extractor["foo"].should eq "bar"
  end

  it "can pull values out from a symbol" do
    extractor = Musterb::HashExtractor.new({:foo => "bar"}, nil)
    extractor["foo"].should eq "bar"
  end

  it "delegates to the parent if there is no match" do
    extractor = Musterb::HashExtractor.new({}, Musterb::HashExtractor.new({:foo => "bar"}, nil))
    extractor["foo"].should eq "bar"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
musterb-1.0.1 spec/musterb/hash_extractor_spec.rb
musterb-1.0.0 spec/musterb/hash_extractor_spec.rb
musterb-0.2.0 spec/musterb/hash_extractor_spec.rb
musterb-0.1.2 spec/musterb/hash_extractor_spec.rb
musterb-0.1.1 spec/musterb/hash_extractor_spec.rb
musterb-0.1.0 spec/musterb/hash_extractor_spec.rb
musterb-0.0.7 spec/musterb/hash_extractor_spec.rb
musterb-0.0.6 spec/musterb/hash_extractor_spec.rb
musterb-0.0.5 spec/musterb/hash_extractor_spec.rb
musterb-0.0.4 spec/musterb/hash_extractor_spec.rb
musterb-0.0.3 spec/musterb/hash_extractor_spec.rb
musterb-0.0.2 spec/musterb/hash_extractor_spec.rb