Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 39 lines (27 sloc) 0.84 kB
d3aded2 @dkubb Add backports to spec helpers
dkubb authored
1 require 'backports'
6729e8e @snusnu Resolved require order dependency issues
snusnu authored
2 require 'spec'
d3aded2 @dkubb Add backports to spec helpers
dkubb authored
3
6729e8e @snusnu Resolved require order dependency issues
snusnu authored
4 require 'isolated/require_spec'
5 require 'dm-core/spec/setup'
6 require 'dm-core/spec/lib/adapter_helpers'
7
8 # To really test this behavior, this spec needs to be run in isolation and not
9 # as part of the typical rake spec run, which requires dm-transactions upfront
10
11 Spec::Runner.configure do |config|
12 config.extend(DataMapper::Spec::Adapters::Helpers)
13 end
14
15 describe "require 'dm-constraints' before calling DataMapper.setup" do
16
17 before(:all) do
18
19 require 'dm-constraints'
20 @adapter = DataMapper::Spec.adapter
21
22 class ::Person
23 include DataMapper::Resource
24 property :id, Serial
25 has n, :tasks
26 end
27
28 class ::Task
29 include DataMapper::Resource
30 property :id, Serial
31 belongs_to :person
32 end
33
34 end
35
36 it_should_behave_like "require 'dm-constraints'"
37
38 end
Something went wrong with that request. Please try again.