Skip to content

Commit

Permalink
Merge pull request #860 from airblade/remove_sacrificial_column
Browse files Browse the repository at this point in the history
Tests: remove sacrificial_column
  • Loading branch information
jaredbeck authored Sep 4, 2016
2 parents fd7756b + a522be0 commit 1da4763
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion test/dummy/db/migrate/20110208155312_set_up_test_tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def up
t.time :a_time
t.date :a_date
t.boolean :a_boolean
t.string :sacrificial_column
t.string :type
t.timestamps null: true
end
Expand Down
3 changes: 1 addition & 2 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,11 @@
t.text "a_text"
t.integer "an_integer"
t.float "a_float"
t.decimal "a_decimal", precision: 6, scale: 4
t.decimal "a_decimal", precision: 6, scale: 4
t.datetime "a_datetime"
t.time "a_time"
t.date "a_date"
t.boolean "a_boolean"
t.string "sacrificial_column"
t.string "type"
t.datetime "created_at"
t.datetime "updated_at"
Expand Down
2 changes: 0 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def assert_changes_equal(expected, actual)
def change_schema
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
remove_column :widgets, :sacrificial_column
add_column :versions, :custom_created_at, :datetime
end
ActiveRecord::Migration.verbose = true
Expand All @@ -121,7 +120,6 @@ def reset_version_class_column_info!
def restore_schema
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
add_column :widgets, :sacrificial_column, :string
remove_column :versions, :custom_created_at
end
ActiveRecord::Migration.verbose = true
Expand Down
1 change: 0 additions & 1 deletion test/unit/model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
change_schema
Widget.connection.schema_cache.clear!
Widget.reset_column_information
assert_raise(NoMethodError) { Widget.new.sacrificial_column }
@last = @widget.versions.last
end

Expand Down

0 comments on commit 1da4763

Please sign in to comment.