Sha256: db71f982f01a46357aa32bea8ec68bfced2f17b2b2ec85d87d8315d036b178fe

Contents?: true

Size: 386 Bytes

Versions: 10

Compression:

Stored size: 386 Bytes

Contents

require 'spec_helper'

describe Virtus, '#freeze' do
  subject { object.freeze }

  let(:model) {
    Class.new {
      include Virtus

      attribute :name, String,  :default => 'foo', :lazy => true
      attribute :age,  Integer, :default => 30
    }
  }

  let(:object) { model.new }

  it { should be_frozen }

  its(:name) { should eql('foo') }
  its(:age)  { should be(30) }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
virtus-1.0.1 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.rc2 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.rc1 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta8 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta7 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta6 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta5 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta4 spec/unit/virtus/freeze_spec.rb
virtus-1.0.0.beta3 spec/unit/virtus/freeze_spec.rb