This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Call finalize after defining Heffalump model for shared adapter spec

  • Loading branch information...
solnic committed Jan 9, 2012
1 parent 64bbcc6 commit 4aa75c11d3cc643b036796f17f6ef66da963553d
Showing with 7 additions and 2 deletions.
  1. +5 −1 lib/dm-core/spec/shared/adapter_spec.rb
  2. +2 −1 spec/semipublic/adapters/in_memory_adapter_spec.rb
@@ -28,7 +28,7 @@ def self.adapter_supports?(*methods)
# (using let/let!) # but # be shure the replacement provides the required
# properties.
let(:heffalump_model) do
- Class.new do
+ model = Class.new do
include DataMapper::Resource
property :id, DataMapper::Property::Serial
property :color, DataMapper::Property::String
@@ -38,6 +38,10 @@ def self.adapter_supports?(*methods)
# This is needed for DataMapper.finalize
def self.name; 'Heffalump'; end
end
+
+ DataMapper.finalize
+
+ model
end
end
@@ -4,9 +4,10 @@
describe 'Adapter' do
supported_by :in_memory do
describe 'DataMapper::Adapters::InMemoryAdapter' do
+ let(:adapter) { DataMapper::Spec.adapter }
+ let(:repository) { DataMapper.repository(adapter.name) }
it_should_behave_like 'An Adapter'
-
end
end
end

3 comments on commit 4aa75c1

@mbj

This comment has been minimized.

Show comment Hide comment
@mbj

mbj Jan 9, 2012

Owner

Mhh I missed these.

Owner

mbj replied Jan 9, 2012

Mhh I missed these.

@solnic

This comment has been minimized.

Show comment Hide comment
@solnic

solnic Jan 9, 2012

Contributor

CI did not :)

Contributor

solnic replied Jan 9, 2012

CI did not :)

@mbj

This comment has been minimized.

Show comment Hide comment
@mbj

mbj Jan 9, 2012

Owner

Yeah, just executed all dm-*-adapter, but forgot the core includes the memory adapter. This is a classic example about the usefullness about a dump "just execute evrything" ci.

Owner

mbj replied Jan 9, 2012

Yeah, just executed all dm-*-adapter, but forgot the core includes the memory adapter. This is a classic example about the usefullness about a dump "just execute evrything" ci.

Please sign in to comment.