Sha256: f98a2d71cb7fb48aec399cd85e525efa9b0a887fec3533cd6536dca447c38dec

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

# -*- coding: utf-8 -*-
require 'minitest/autorun'
require 'simplecov'
SimpleCov.start
require 'sixarm_ruby_hash_more'

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

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_hash_more-1.3.0 test/sixarm_ruby_hash_more_test.rb