Sha256: 704a0eace76ba0c95fe5b63c0a2b657bb07c057335257feb62059cbbdd925f3e

Contents?: true

Size: 572 Bytes

Versions: 9

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

describe Virtus::ValueObject, '.equalizer' do
  subject { described_class.equalizer }

  let(:described_class) do
    Class.new do
      include Virtus::ValueObject

      attribute :first_name, String
    end
  end

  specify { subject.should be_instance_of(Virtus::Equalizer) }
  specify { described_class.included_modules.should include(subject)      }

  context 'when equalizer is already initialized' do
    before { subject; described_class.equalizer }

    let(:equalizer) { subject }

    specify { subject.should be(equalizer) }
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
virtus-0.5.5 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.5.4 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.5.3 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.5.2 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.5.1 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.5.0 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.4.2 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb
virtus-0.4.1 spec/unit/virtus/value_object/class_methods/equalizer_spec.rb