(1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.0ms) select sqlite_version(*)  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to AddLargeTextFields (20110217210640)  (0.0ms) begin transaction  (0.3ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)  (0.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110217210640"]]  (2.7ms) commit transaction Migrating to CreateLibraries (20160217033529)  (0.0ms) begin transaction  (0.3ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160217033529"]]  (1.5ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='large_text_field_by_owner_field' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='large_text_field_by_owner_field' AND type='index'   (1.4ms) DROP TABLE "large_text_fields"  (1.4ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)  (0.0ms) select sqlite_version(*)  (1.2ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")  (1.2ms) DROP TABLE "libraries"  (1.2ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)  (0.1ms) SELECT version FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]] Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (1.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (1.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (7.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (33.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (8.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (3.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (1.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (2.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (1.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (2.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.8ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (2.8ms) rollback transaction  (0.4ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (1.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (63.6ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB  (28.3ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)  (14.4ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB  (14.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB  (25.4ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)   (1.0ms) SELECT version FROM `schema_migrations`  (0.5ms) INSERT INTO `schema_migrations` (version) VALUES ('20160217033529')  (1.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20110217210640') ActiveRecord::SchemaMigration Load (3.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`  (13.5ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB  (29.8ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations` Migrating to AddLargeTextFields (20110217210640)  (25.8ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB  (15.0ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)   (0.1ms) BEGIN SQL (3.1ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20110217210640')  (0.4ms) COMMIT Migrating to CreateLibraries (20160217033529)  (15.7ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB  (0.1ms) BEGIN SQL (0.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160217033529')  (0.3ms) COMMIT ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`  (0.3ms) SELECT fk.referenced_table_name as 'to_table' ,fk.referenced_column_name as 'primary_key' ,fk.column_name as 'column' ,fk.constraint_name as 'name' FROM information_schema.key_column_usage fk WHERE fk.referenced_column_name is not null AND fk.table_schema = 'large_text_field_test' AND fk.table_name = 'large_text_fields'  (0.1ms) SHOW CREATE TABLE `large_text_fields`  (0.2ms) SELECT fk.referenced_table_name as 'to_table' ,fk.referenced_column_name as 'primary_key' ,fk.column_name as 'column' ,fk.constraint_name as 'name' FROM information_schema.key_column_usage fk WHERE fk.referenced_column_name is not null AND fk.table_schema = 'large_text_field_test' AND fk.table_name = 'libraries'  (0.1ms) SHOW CREATE TABLE `libraries`  (6.3ms) DROP TABLE `large_text_fields` CASCADE  (32.5ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB  (20.9ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)   (4.1ms) DROP TABLE `libraries` CASCADE  (12.3ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB  (3.0ms) SELECT version FROM `schema_migrations` ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations` ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.9ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (1.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.9ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (2.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (11.5ms) DROP TABLE `large_text_fields` CASCADE  (22.7ms) CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB  (41.1ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)   (2.9ms) DROP TABLE `libraries` CASCADE  (16.0ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB  (8.5ms) SELECT version FROM `schema_migrations` ActiveRecord::SchemaMigration Load (1.8ms) SELECT `schema_migrations`.* FROM `schema_migrations` ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner. --------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]] Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. --------------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names. -------------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name. ------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------------------------- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field. --------------------------------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided. ----------------------------------------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow a single argument to be passed into reload. --------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1  [["id", 2]]  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]] SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded. ----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields. ----------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]] SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]] SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]] SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined. -------------------------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank. ------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]] SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (1.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved. --------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]] Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank. ---------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]] SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.9ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded. -------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. -----------------------------------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum. -----------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should read from a file. ------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model. ------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]  (0.0ms) SAVEPOINT active_record_1 LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]] SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]  (1.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested. -------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods. ------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length. -----------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string. ----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (1.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string. --------------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]] SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]] LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------------------------- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value. -----------------------------------------------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------ LargeTextFieldTest: test_truth ------------------------------  (0.0ms) rollback transaction