Sha256: 1f83d30b6c5ede0c6d7f4ab1ef6f22965d23c726a55312f50af9b740a2ff78a2

Contents?: true

Size: 369 Bytes

Versions: 10

Compression:

Stored size: 369 Bytes

Contents

require 'spec_helper'
require 'pry'

describe Snuffle::Element::Hash do

  let(:hash) { Snuffle::Element::Hash.new(nil) }

  describe "#pairs" do
    it "creates hash pairs from its keys and values" do
      expect(hash).to receive(:keys) {[:foo, :bar]}
      expect(hash).to receive(:values) {[1, 2]}
      expect(hash.pairs).to eq({foo: 1, bar: 2})
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
snuffle-0.14.2 spec/snuffle/elements/hash_spec.rb
snuffle-0.14.1 spec/snuffle/elements/hash_spec.rb
snuffle-0.14.0 spec/snuffle/elements/hash_spec.rb
snuffle-0.13.0 spec/snuffle/elements/hash_spec.rb
snuffle-0.12.2 spec/snuffle/elements/hash_spec.rb
snuffle-0.12.1 spec/snuffle/elements/hash_spec.rb
snuffle-0.12.0 spec/snuffle/elements/hash_spec.rb
snuffle-0.11.1 spec/snuffle/elements/hash_spec.rb
snuffle-0.10.1 spec/snuffle/elements/hash_spec.rb
snuffle-0.9.1 spec/snuffle/elements/hash_spec.rb