Sha256: 7f0587f8f53a3b6968a200c31710e1fe40b85967eeb680c9cc389e18848360ac

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

require "spec_helper"

require "hamster/immutable"

describe Hamster::Immutable do

  class Fixture
    include Hamster::Immutable
  end

  [:dup, :clone].each do |method|

    describe "##{method}" do

      before do
        @original = Fixture.new
        @result = @original.send(method)
      end

      it "returns self" do
        @result.should equal(@original)
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hamster-1.0.1.pre.rc.1 spec/hamster/immutable/copying_spec.rb