Sha256: d7a9e93a198ae51c8964599fc21e6dbbc094503cf86441d4ca74d8784040b897

Contents?: true

Size: 438 Bytes

Versions: 13

Compression:

Stored size: 438 Bytes

Contents

require 'spec_helper'

describe Virtus::Attribute::Boolean, '#define_reader_method' do
  subject { object.define_reader_method(mod) }

  let(:object) { described_class.new(:active)              }
  let(:mod)    { mock('mod', :define_reader_method => nil) }

  it { should equal(object) }

  it 'defines a reader method in the module' do
    mod.should_receive(:define_reader_method).with(object, 'active?', :public)
    subject
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
virtus-0.5.5 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.5.4 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.5.3 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.5.2 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.5.1 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.5.0 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.4.2 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.4.1 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.4.0 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.3.0 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.2.0 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb
virtus-0.1.0 spec/unit/virtus/attribute/boolean/define_reader_method_spec.rb