Sha256: b110c6781b8e1a061452c9745eb68111c7403a9c92fcb901c95875cb538a9dd0

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Attribute::String, '#hash' do
  subject { object.hash }

  let(:object)     { described_class.new(name, options) }
  let(:name)       { :name                              }
  let(:required)   { true                               }
  let(:min_length) { 0                                  }
  let(:max_length) { 50                                 }

  let(:options) do
    {
      :required   => required,
      :min_length => min_length,
      :max_length => max_length,
    }
  end

  it_should_behave_like 'a hash method'

  it { should == described_class.hash ^ name.hash ^ required.hash ^ min_length.hash ^ max_length.hash }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/attribute/string/hash_spec.rb