Sha256: ba6dfcdc97b9fb4f18974129ba9f3c8213ff020579fb95264c22e382b99a2cdc
Contents?: true
Size: 521 Bytes
Versions: 7
Compression:
Stored size: 521 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require 'hamster/immutable' describe Hamster::Immutable do describe "#new" do class Person < Struct.new(:first, :last) include Hamster::Immutable end before do @instance = Person.new("Simon", "Harris") end it "passes the constructor arguments" do @instance.first.should == "Simon" @instance.last.should == "Harris" end it "freezes the instance" do @instance.should be_frozen end end end
Version data entries
7 entries across 7 versions & 1 rubygems