Module: DataMapper::Spec::CollectionHelpers::GroupMethods

Defined in:
lib/dm-core/spec/lib/collection_helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



5
6
7
8
9
# File 'lib/dm-core/spec/lib/collection_helpers.rb', line 5

def self.extended(base)
  base.class_inheritable_accessor :loaded
  base.loaded = false
  super
end

Instance Method Details

#should_not_be_a_kicker(ivar = :@articles) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/dm-core/spec/lib/collection_helpers.rb', line 11

def should_not_be_a_kicker(ivar = :@articles)
  unless loaded
    it 'should not be a kicker' do
      instance_variable_get(ivar).should_not be_loaded
    end
  end
end