Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Fixed some integration specs which tested the old :database option.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern authored and dkubb committed Aug 25, 2010
1 parent a4955d9 commit 6ef9a1d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions spec/integration/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,20 @@
@migration.name.should == :create_people_table
end

it "should have a :database option" do
adapter = DataMapper::Spec.adapter(:alternate)
m = DataMapper::Migration.new(2, :create_dogs_table, :database => :alternate) {}
m.instance_variable_get(:@adapter).should == adapter
it "should have a :repository option" do
m = DataMapper::Migration.new(2, :create_dogs_table, :repository => :alternate) {}

m.instance_variable_get(:@repository).should == :alternate
end

it "should use the default repository by default" do
@migration.instance_variable_get(:@repository).should == :default
end

it "should use the default database by default" do
@migration.instance_variable_get(:@database).name.should == :default
it "should still support a :database option" do
m = DataMapper::Migration.new(2, :create_legacy_table, :database => :legacy) {}

m.instance_variable_get(:@repository).should == :legacy
end

it "should have a verbose option" do
Expand Down

0 comments on commit 6ef9a1d

Please sign in to comment.