Sha256: 5e32414a092bee37c0f0d9970898af624c67026aa665c84f38aa683ac7de354c

Contents?: true

Size: 514 Bytes

Versions: 3

Compression:

Stored size: 514 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_hash_more_test"

describe HashMore do

  before do
    @h = HashMore.new
  end

  describe ".new" do

    it "is a blank hash" do
      @h.must_equal Hash.new
    end

  end

  describe "=" do

    it "=" do
      @h[:a][:b][:c] = 'hello'
      @h[:a][:b][:c].must_equal 'hello'
    end

  end

  describe "+" do

    it "+=" do
      @h[:a][:b][:c] += 3
      @h[:a][:b][:c].must_equal 3
      @h[:a][:b][:c] += 3
      @h[:a][:b][:c].must_equal 6
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sixarm_ruby_hash_more-2.0.0 test/sixarm_ruby_hash_more_test/hash_more_test.rb
sixarm_ruby_hash_more-1.3.3 test/sixarm_ruby_hash_more_test/hash_more_test.rb
sixarm_ruby_hash_more-1.3.2 test/sixarm_ruby_hash_more_test/hash_more_test.rb