Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed failing specs

  • Loading branch information...
commit 38619176a6e6b7a2c1c9afd461256e7971b33a35 1 parent 16717d1
@dkubb dkubb authored
View
26 spec/isolated/require_after_setup_spec.rb
@@ -1,30 +1,30 @@
require 'spec'
require 'isolated/require_spec'
require 'dm-core/spec/setup'
-require 'dm-core/spec/lib/adapter_helpers'
# To really test this behavior, this spec needs to be run in isolation and not
# as part of the typical rake spec run, which requires dm-transactions upfront
-describe "require 'dm-migrations' after calling DataMapper.setup" do
- extend DataMapper::Spec::Adapters::Helpers
+if %w[postgres mysql sqlite oracle sqlserver].include?(ENV['ADAPTER'])
- before(:all) do
+ describe "require 'dm-migrations' after calling DataMapper.setup" do
- @adapter = DataMapper::Spec.adapter
- require 'dm-migrations'
+ before(:all) do
- class ::Person
- include DataMapper::Resource
- property :id, Serial
- end
+ @adapter = DataMapper::Spec.adapter
+ require 'dm-migrations'
- @model = Person
+ class ::Person
+ include DataMapper::Resource
+ property :id, Serial
+ end
- end
+ @model = Person
+
+ end
- supported_by :postgres, :mysql, :sqlite, :oracle, :sqlserver do
it_should_behave_like "require 'dm-migrations'"
+
end
end
View
26 spec/isolated/require_before_setup_spec.rb
@@ -1,30 +1,30 @@
require 'spec'
require 'isolated/require_spec'
require 'dm-core/spec/setup'
-require 'dm-core/spec/lib/adapter_helpers'
# To really test this behavior, this spec needs to be run in isolation and not
# as part of the typical rake spec run, which requires dm-transactions upfront
-describe "require 'dm-migrations' before calling DataMapper.setup" do
- extend DataMapper::Spec::Adapters::Helpers
+if %w[postgres mysql sqlite oracle sqlserver].include?(ENV['ADAPTER'])
- before(:all) do
+ describe "require 'dm-migrations' before calling DataMapper.setup" do
- require 'dm-migrations'
- @adapter = DataMapper::Spec.adapter
+ before(:all) do
- class ::Person
- include DataMapper::Resource
- property :id, Serial
- end
+ require 'dm-migrations'
+ @adapter = DataMapper::Spec.adapter
- @model = Person
+ class ::Person
+ include DataMapper::Resource
+ property :id, Serial
+ end
- end
+ @model = Person
+
+ end
- supported_by :postgres, :mysql, :sqlite, :oracle, :sqlserver do
it_should_behave_like "require 'dm-migrations'"
+
end
end

0 comments on commit 3861917

Please sign in to comment.
Something went wrong with that request. Please try again.