test/dummy/log/test.log in dirty_associations-0.3.0 vs test/dummy/log/test.log in dirty_associations-0.4.0

- old
+ new

@@ -2663,5 +2663,3105 @@  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = 1 AND "foos"."id" IN (2)  (0.0ms) UPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.537246' WHERE "foos"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (7.1ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (6.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:37:17 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:37:17 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.7ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:46:18 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:46:18 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.6ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:20 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.8ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 15 May 2014 11:58:38 UTC +00:00], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Thu, 15 May 2014 11:58:38 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (3.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:22:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:26:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:30:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.2ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:39:54 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (3.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:41:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.3ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:03 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.5ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:27 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.3ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:42:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:43:19 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 12:47:59 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (4.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:02:09 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (6.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:49:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:08 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:08 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:13 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:13 UTC +00:00]] + SQL (0.4ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:50:13 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:13 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:13 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.4ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:50:21 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:50:21 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:21 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:21 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:24 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:24 UTC +00:00]] + SQL (0.3ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:50:24 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:50:24 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:50:24 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:22 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:51:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:52:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (6.4ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:53:50 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.4ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 14:54:10 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:54:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (5.7ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:55:02 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:55:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:55:02 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:55:02 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:56:32 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:57:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:57:23 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:57:23 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:57:23 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 14:59:09 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 14:59:09 UTC +00:00]] + SQL (0.4ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 14:59:09 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:00:12 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (5.7ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:00:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:01:43 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (5.6ms) rollback transaction +  (0.3ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:02:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:02:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:02:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:02:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.4ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:02:17 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:02:17 UTC +00:00]] + SQL (0.4ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:02:17 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:04:01 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:04:01 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:04:01 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:04:01 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.3ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:04:02 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:04:02 UTC +00:00]] + SQL (0.3ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:04:02 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:20 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.9ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.3ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:05:30 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.5ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.5ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.1ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:08:15 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (22.8ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:36 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (1.2ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:36 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:36 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:36 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (1.5ms) rollback transaction +  (0.0ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) rollback transaction +  (0.1ms) begin transaction +---------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_assocation_attributes_adds_association_to_changes +---------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:37 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) rollback transaction +  (0.2ms) begin transaction +------------------------------------------------- +DirtyAssociationsTest: test_changes_reset_by_save +------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (2.0ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] + SQL (0.2ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:44 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (6.4ms) rollback transaction +  (0.1ms) begin transaction +--------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save +--------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) rollback transaction +  (0.1ms) begin transaction +------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes +------------------------------------------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +---------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes +---------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction +  (0.0ms) begin transaction +----------------------------------------------------------------------------------------------------- +DirtyAssociationsTest: test_setting_has_many_association_to_the_same_thing_is_not_counted_as_a_change +----------------------------------------------------------------------------------------------------- +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + Foo Load (0.0ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (2) [["bar_id", 1]] + SQL (0.1ms) UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) UPDATE "bars" SET "updated_at" = ? WHERE "bars"."id" = 1 [["updated_at", Fri, 03 Oct 2014 15:10:45 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) rollback transaction