Sha256: 132508a2059aadea269aa3e0b0d70c2c74cd0f8c67d3229dbdf6ef27c02e34bf

Contents?: true

Size: 298 Bytes

Versions: 4

Compression:

Stored size: 298 Bytes

Contents

require "spec_helper"
require "hamster/immutable"

describe Hamster::Immutable do
  class NewPerson < Struct.new(:first, :last)
    include Hamster::Immutable
  end

  let(:immutable) { NewPerson.new("Simon", "Harris") }

  it "freezes the instance" do
    expect(immutable).to be_frozen
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hamster-1.0.0 spec/lib/hamster/immutable/new_spec.rb
hamster-1.0.1.pre.rc3 spec/lib/hamster/immutable/new_spec.rb
hamster-1.0.1.pre.rc2 spec/hamster/immutable/new_spec.rb
hamster-1.0.1.pre.rc.1 spec/hamster/immutable/new_spec.rb