Sha256: f878668793ece07e11091c7321a0f32878656198233249b9ee17dfc5f406048c

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 Bytes

Contents

require File.expand_path('../../../spec_helper', __FILE__)

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

7 entries across 7 versions & 1 rubygems

Version Path
hamster-0.3.6 spec/hamster/immutable/copying_spec.rb
hamster-0.3.5 spec/hamster/immutable/copying_spec.rb
hamster-0.3.4 spec/hamster/immutable/copying_spec.rb
hamster-0.3.3 spec/hamster/immutable/copying_spec.rb
hamster-0.3.2 spec/hamster/immutable/copying_spec.rb
hamster-0.3.1 spec/hamster/immutable/copying_spec.rb
hamster-0.3.0 spec/hamster/immutable/copying_spec.rb