Tests were failing due to Schema cache not being cleared on reset_column_information

This commit is contained in:
Ben Morrall 2012-05-20 13:06:20 +10:00
parent e870e0d561
commit 63fe9d28ef
2 changed files with 2 additions and 0 deletions

View File

@ -353,6 +353,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
context "after a column is removed from the record's schema" do
setup do
change_schema
Widget.connection.schema_cache.clear!
Widget.reset_column_information
assert_raise(NoMethodError) { Widget.new.sacrificial_column }
@last = @widget.versions.last

View File

@ -5,6 +5,7 @@ class TimestampTest < ActiveSupport::TestCase
setup do
PaperTrail.timestamp_field = :custom_created_at
change_schema
Version.connection.schema_cache.clear!
Version.reset_column_information
Fluxor.instance_eval <<-END