legacy_migrations 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/legacy_migrations.gemspec +1 -1
- data/lib/legacy_migrations/status_report.rb +1 -1
- data/spec/legacy_migrations_spec.rb +15 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/legacy_migrations.gemspec
CHANGED
@@ -80,6 +80,21 @@ describe LegacyMigrations do
|
|
80
80
|
a.operations.size == 2
|
81
81
|
a.operations[1].type == 'update'
|
82
82
|
end
|
83
|
+
it "retrieves a specified operation's results" do
|
84
|
+
Person.create(:name => 'aoeu')
|
85
|
+
transfer_from Person, :to => Animal do
|
86
|
+
from :name, :to => :name
|
87
|
+
end
|
88
|
+
a = update_from Person, :to => Animal do
|
89
|
+
based_on do
|
90
|
+
name == from.name
|
91
|
+
end
|
92
|
+
from :name, :to => :name
|
93
|
+
end
|
94
|
+
update_op = a.operation_with(:destination => Animal, :type => 'update')
|
95
|
+
update_op.should be_instance_of Operation
|
96
|
+
update_op.source.should == Person
|
97
|
+
end
|
83
98
|
|
84
99
|
it "records all changes by default" do
|
85
100
|
Person.create(:name => 'aoeu')
|