acts_as_ruintsti 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55bb3314bf2df45e9499ba3e5eeee0b1f9284f24
4
- data.tar.gz: d7e538b5a7645963bf35e272b1333c44d548bd7f
3
+ metadata.gz: 265feb31bbd24ce5113fb1b8e9479e8d1cfdfae9
4
+ data.tar.gz: 9d84665c2bd365a3e12903e6d6f71c39d5b2556c
5
5
  SHA512:
6
- metadata.gz: 758ae15f828db1c2404fa2b4da586e64e77f965f17063dbb9d2069610c8ad46d989e16a26a28d44c2ba5a507e1b0eaaa2f62dcdfb4e1529bbc329a947d01119e
7
- data.tar.gz: 8b454285c0bb588cdef465d9b75ee164ee268d4adcc513782475da16bc4529453462ba78f79f965f6005f75b74c6c000c655a528d002004d2a6f381c8f5c11ba
6
+ metadata.gz: 1ea7377ce92b3cb82fb09c2637c273f10fdb035fd3ff7b36f935fd30523990755f90448e8adb0402206fce64d9b90df66365286f523bf908e3900fddf87e7536
7
+ data.tar.gz: 01b146620ab928ece709ce4b533e9159b5a869b5ae8e841774626523bc733d8abf3801984bc715e46f313ec11d256bffb16e55363ed0d1705460de011fb9eeb0
@@ -1,3 +1,3 @@
1
1
  module ActsAsRuintsti
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -23,6 +23,7 @@ module ActsAsRuintsti
23
23
  def subclass_from_attrs(attr)
24
24
  type_num = attr.with_indifferent_access[inheritance_column]
25
25
  if type_num.present?
26
+ type_num = type_num.to_i if type_num.class == String and type_num =~ /\A\d+\z/
26
27
  subclass_name = @@acts_as_ruintsti_params[type_num]
27
28
  if subclass_name.present? && subclass_name != self.name
28
29
  subclass = subclass_name.safe_constantize
@@ -47,8 +47,8 @@ class ActsAsRuintstiTest < ActiveSupport::TestCase
47
47
  assert_equal Block.new(:type => 1).class, RedBlock
48
48
  end
49
49
 
50
- test "when create block type=2, created BlueBlock" do
51
- assert_equal Block.new(:type => 2).class, BlueBlock
50
+ test "when create block type='2', created BlueBlock" do
51
+ assert_equal Block.new(:type => '2').class, BlueBlock
52
52
  end
53
53
 
54
54
  test "when create block type=3, raise SubclassNotFound" do
@@ -56,4 +56,10 @@ class ActsAsRuintstiTest < ActiveSupport::TestCase
56
56
  Block.new(:type => 3)
57
57
  end
58
58
  end
59
+
60
+ test "when create block type='hoge', raise SubclassNotFound" do
61
+ assert_raise ActiveRecord::SubclassNotFound do
62
+ Block.new(:type => 'hoge')
63
+ end
64
+ end
59
65
  end
@@ -1298,3 +1298,789 @@ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1298
1298
  SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1299
1299
  SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1300
1300
   (0.6ms) rollback transaction
1301
+  (0.3ms) begin transaction
1302
+ ----------------------------------------------
1303
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1304
+ ----------------------------------------------
1305
+  (0.0ms) SAVEPOINT active_record_1
1306
+ SQL (2.1ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1308
+  (0.0ms) SAVEPOINT active_record_1
1309
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1310
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1311
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1312
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1313
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1314
+  (2.1ms) rollback transaction
1315
+  (0.1ms) begin transaction
1316
+ ---------------------------------------------
1317
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1318
+ ---------------------------------------------
1319
+  (0.0ms) SAVEPOINT active_record_1
1320
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1322
+  (0.0ms) SAVEPOINT active_record_1
1323
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1324
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1325
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1326
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1327
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1328
+  (0.6ms) rollback transaction
1329
+  (0.1ms) begin transaction
1330
+ --------------------------------------------------------------
1331
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1332
+ --------------------------------------------------------------
1333
+  (0.0ms) SAVEPOINT active_record_1
1334
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1335
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1336
+  (0.0ms) SAVEPOINT active_record_1
1337
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1339
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1340
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1341
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1342
+  (0.5ms) rollback transaction
1343
+  (0.0ms) begin transaction
1344
+ ------------------------------------------------------------
1345
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1346
+ ------------------------------------------------------------
1347
+  (0.0ms) SAVEPOINT active_record_1
1348
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1350
+  (0.0ms) SAVEPOINT active_record_1
1351
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1352
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1353
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1354
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1355
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1356
+  (0.5ms) rollback transaction
1357
+  (0.1ms) begin transaction
1358
+ -------------------------------------------------------------------
1359
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1360
+ -------------------------------------------------------------------
1361
+  (0.0ms) SAVEPOINT active_record_1
1362
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1363
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1364
+  (0.0ms) SAVEPOINT active_record_1
1365
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1366
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1367
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1368
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1369
+  (0.8ms) rollback transaction
1370
+  (0.1ms) begin transaction
1371
+ --------------------------------------------------------------------
1372
+ ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
1373
+ --------------------------------------------------------------------
1374
+  (0.1ms) SAVEPOINT active_record_1
1375
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1377
+  (0.0ms) SAVEPOINT active_record_1
1378
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1380
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1381
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1382
+  (0.6ms) rollback transaction
1383
+  (0.0ms) begin transaction
1384
+ -------------------------------------------------------------------------
1385
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1386
+ -------------------------------------------------------------------------
1387
+  (0.0ms) SAVEPOINT active_record_1
1388
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1389
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1390
+  (0.1ms) SAVEPOINT active_record_1
1391
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1392
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1393
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1394
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1395
+  (0.5ms) rollback transaction
1396
+  (0.3ms) begin transaction
1397
+ ----------------------------------------------
1398
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1399
+ ----------------------------------------------
1400
+  (0.0ms) SAVEPOINT active_record_1
1401
+ SQL (2.0ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1402
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1403
+  (0.0ms) SAVEPOINT active_record_1
1404
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1405
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1406
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1407
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1408
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1409
+  (2.1ms) rollback transaction
1410
+  (0.1ms) begin transaction
1411
+ ---------------------------------------------
1412
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1413
+ ---------------------------------------------
1414
+  (0.0ms) SAVEPOINT active_record_1
1415
+ SQL (0.6ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1416
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1417
+  (0.1ms) SAVEPOINT active_record_1
1418
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1419
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1420
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1421
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1422
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1423
+  (0.7ms) rollback transaction
1424
+  (0.0ms) begin transaction
1425
+ --------------------------------------------------------------
1426
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1427
+ --------------------------------------------------------------
1428
+  (0.0ms) SAVEPOINT active_record_1
1429
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1430
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1431
+  (0.0ms) SAVEPOINT active_record_1
1432
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1433
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1434
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1435
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1436
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1437
+  (0.6ms) rollback transaction
1438
+  (0.0ms) begin transaction
1439
+ ------------------------------------------------------------
1440
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1441
+ ------------------------------------------------------------
1442
+  (0.0ms) SAVEPOINT active_record_1
1443
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1445
+  (0.0ms) SAVEPOINT active_record_1
1446
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1447
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1448
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1449
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1450
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1451
+  (0.7ms) rollback transaction
1452
+  (0.0ms) begin transaction
1453
+ ----------------------------------------------------------------------
1454
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1455
+ ----------------------------------------------------------------------
1456
+  (0.0ms) SAVEPOINT active_record_1
1457
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1458
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1459
+  (0.1ms) SAVEPOINT active_record_1
1460
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1461
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1462
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1463
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1464
+  (0.6ms) rollback transaction
1465
+  (0.1ms) begin transaction
1466
+ -------------------------------------------------------------------
1467
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1468
+ -------------------------------------------------------------------
1469
+  (0.0ms) SAVEPOINT active_record_1
1470
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1472
+  (0.0ms) SAVEPOINT active_record_1
1473
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1474
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1475
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1476
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1477
+  (0.6ms) rollback transaction
1478
+  (0.0ms) begin transaction
1479
+ -------------------------------------------------------------------------
1480
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1481
+ -------------------------------------------------------------------------
1482
+  (0.0ms) SAVEPOINT active_record_1
1483
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1484
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1485
+  (0.0ms) SAVEPOINT active_record_1
1486
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1488
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1489
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1490
+  (0.6ms) rollback transaction
1491
+  (1.4ms) begin transaction
1492
+ ----------------------------------------------
1493
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1494
+ ----------------------------------------------
1495
+  (0.0ms) SAVEPOINT active_record_1
1496
+ SQL (2.1ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1497
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1498
+  (0.0ms) SAVEPOINT active_record_1
1499
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1501
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1502
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1503
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1504
+  (2.1ms) rollback transaction
1505
+  (0.1ms) begin transaction
1506
+ ---------------------------------------------
1507
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1508
+ ---------------------------------------------
1509
+  (0.0ms) SAVEPOINT active_record_1
1510
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1511
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1512
+  (0.0ms) SAVEPOINT active_record_1
1513
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1514
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1515
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1516
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1517
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1518
+  (0.5ms) rollback transaction
1519
+  (0.1ms) begin transaction
1520
+ --------------------------------------------------------------
1521
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1522
+ --------------------------------------------------------------
1523
+  (0.0ms) SAVEPOINT active_record_1
1524
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1525
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1526
+  (0.0ms) SAVEPOINT active_record_1
1527
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1528
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1529
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1530
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1531
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1532
+  (0.6ms) rollback transaction
1533
+  (0.0ms) begin transaction
1534
+ ------------------------------------------------------------
1535
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1536
+ ------------------------------------------------------------
1537
+  (0.0ms) SAVEPOINT active_record_1
1538
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1539
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1540
+  (0.0ms) SAVEPOINT active_record_1
1541
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1542
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1543
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1544
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1545
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1546
+  (0.5ms) rollback transaction
1547
+  (0.1ms) begin transaction
1548
+ ----------------------------------------------------------------------
1549
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1550
+ ----------------------------------------------------------------------
1551
+  (0.0ms) SAVEPOINT active_record_1
1552
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1553
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1554
+  (0.0ms) SAVEPOINT active_record_1
1555
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1557
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1558
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1559
+  (0.6ms) rollback transaction
1560
+  (0.1ms) begin transaction
1561
+ -------------------------------------------------------------------
1562
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1563
+ -------------------------------------------------------------------
1564
+  (0.0ms) SAVEPOINT active_record_1
1565
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1567
+  (0.0ms) SAVEPOINT active_record_1
1568
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1569
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1570
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1571
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1572
+  (0.7ms) rollback transaction
1573
+  (0.0ms) begin transaction
1574
+ -------------------------------------------------------------------------
1575
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1576
+ -------------------------------------------------------------------------
1577
+  (0.0ms) SAVEPOINT active_record_1
1578
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1579
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1580
+  (0.0ms) SAVEPOINT active_record_1
1581
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1583
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1584
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1585
+  (0.6ms) rollback transaction
1586
+  (0.3ms) begin transaction
1587
+ ----------------------------------------------
1588
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1589
+ ----------------------------------------------
1590
+  (0.0ms) SAVEPOINT active_record_1
1591
+ SQL (2.7ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1592
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1593
+  (0.0ms) SAVEPOINT active_record_1
1594
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1595
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1596
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1597
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1598
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1599
+  (0.6ms) rollback transaction
1600
+  (0.1ms) begin transaction
1601
+ ---------------------------------------------
1602
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1603
+ ---------------------------------------------
1604
+  (0.0ms) SAVEPOINT active_record_1
1605
+ SQL (0.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1606
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1607
+  (0.0ms) SAVEPOINT active_record_1
1608
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1610
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1611
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1612
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1613
+  (0.6ms) rollback transaction
1614
+  (0.0ms) begin transaction
1615
+ --------------------------------------------------------------
1616
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1617
+ --------------------------------------------------------------
1618
+  (0.0ms) SAVEPOINT active_record_1
1619
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1621
+  (0.0ms) SAVEPOINT active_record_1
1622
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1623
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1624
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1625
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1626
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1627
+  (0.6ms) rollback transaction
1628
+  (0.0ms) begin transaction
1629
+ ------------------------------------------------------------
1630
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1631
+ ------------------------------------------------------------
1632
+  (0.1ms) SAVEPOINT active_record_1
1633
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1634
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1635
+  (0.0ms) SAVEPOINT active_record_1
1636
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1637
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1638
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1639
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1640
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1641
+  (0.6ms) rollback transaction
1642
+  (0.1ms) begin transaction
1643
+ ----------------------------------------------------------------------
1644
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1645
+ ----------------------------------------------------------------------
1646
+  (0.0ms) SAVEPOINT active_record_1
1647
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1648
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1649
+  (0.0ms) SAVEPOINT active_record_1
1650
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1651
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1652
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1653
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1654
+  (0.6ms) rollback transaction
1655
+  (0.1ms) begin transaction
1656
+ -------------------------------------------------------------------
1657
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1658
+ -------------------------------------------------------------------
1659
+  (0.0ms) SAVEPOINT active_record_1
1660
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1661
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1662
+  (0.0ms) SAVEPOINT active_record_1
1663
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1664
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1665
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1666
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1667
+  (0.6ms) rollback transaction
1668
+  (0.0ms) begin transaction
1669
+ -------------------------------------------------------------------------
1670
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1671
+ -------------------------------------------------------------------------
1672
+  (0.0ms) SAVEPOINT active_record_1
1673
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1675
+  (0.0ms) SAVEPOINT active_record_1
1676
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1677
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1678
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1679
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1680
+  (0.6ms) rollback transaction
1681
+  (0.3ms) begin transaction
1682
+ ----------------------------------------------
1683
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1684
+ ----------------------------------------------
1685
+  (0.0ms) SAVEPOINT active_record_1
1686
+ SQL (2.0ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1687
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1688
+  (0.0ms) SAVEPOINT active_record_1
1689
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1690
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1691
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1692
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1693
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1694
+  (2.6ms) rollback transaction
1695
+  (0.1ms) begin transaction
1696
+ ---------------------------------------------
1697
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1698
+ ---------------------------------------------
1699
+  (0.0ms) SAVEPOINT active_record_1
1700
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1701
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1702
+  (0.0ms) SAVEPOINT active_record_1
1703
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1704
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1705
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1706
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1707
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1708
+  (0.5ms) rollback transaction
1709
+  (0.1ms) begin transaction
1710
+ --------------------------------------------------------------
1711
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1712
+ --------------------------------------------------------------
1713
+  (0.0ms) SAVEPOINT active_record_1
1714
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1715
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1716
+  (0.0ms) SAVEPOINT active_record_1
1717
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1718
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1719
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1720
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1721
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1722
+  (0.6ms) rollback transaction
1723
+  (0.0ms) begin transaction
1724
+ ------------------------------------------------------------
1725
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1726
+ ------------------------------------------------------------
1727
+  (0.0ms) SAVEPOINT active_record_1
1728
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1729
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1730
+  (0.0ms) SAVEPOINT active_record_1
1731
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1732
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1733
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1734
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1735
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1736
+  (0.5ms) rollback transaction
1737
+  (0.1ms) begin transaction
1738
+ ----------------------------------------------------------------------
1739
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1740
+ ----------------------------------------------------------------------
1741
+  (0.0ms) SAVEPOINT active_record_1
1742
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1744
+  (0.0ms) SAVEPOINT active_record_1
1745
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1746
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1747
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1748
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1749
+  (0.5ms) rollback transaction
1750
+  (0.1ms) begin transaction
1751
+ -------------------------------------------------------------------
1752
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1753
+ -------------------------------------------------------------------
1754
+  (0.0ms) SAVEPOINT active_record_1
1755
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1756
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1757
+  (0.0ms) SAVEPOINT active_record_1
1758
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1759
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1760
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1761
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1762
+  (0.7ms) rollback transaction
1763
+  (0.1ms) begin transaction
1764
+ -------------------------------------------------------------------------
1765
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1766
+ -------------------------------------------------------------------------
1767
+  (0.0ms) SAVEPOINT active_record_1
1768
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1769
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1770
+  (0.0ms) SAVEPOINT active_record_1
1771
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1772
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1773
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1774
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1775
+  (0.7ms) rollback transaction
1776
+  (0.3ms) begin transaction
1777
+ ----------------------------------------------
1778
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1779
+ ----------------------------------------------
1780
+  (0.1ms) SAVEPOINT active_record_1
1781
+ SQL (2.6ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1782
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1783
+  (0.1ms) SAVEPOINT active_record_1
1784
+ SQL (0.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1785
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1786
+ Block Load (0.2ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1787
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1788
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1789
+  (1.9ms) rollback transaction
1790
+  (0.1ms) begin transaction
1791
+ ---------------------------------------------
1792
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1793
+ ---------------------------------------------
1794
+  (0.0ms) SAVEPOINT active_record_1
1795
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1796
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1797
+  (0.0ms) SAVEPOINT active_record_1
1798
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1800
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1801
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1802
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1803
+  (0.6ms) rollback transaction
1804
+  (0.1ms) begin transaction
1805
+ --------------------------------------------------------------
1806
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1807
+ --------------------------------------------------------------
1808
+  (0.0ms) SAVEPOINT active_record_1
1809
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1810
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1811
+  (0.0ms) SAVEPOINT active_record_1
1812
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1813
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1814
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1815
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1816
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1817
+  (0.6ms) rollback transaction
1818
+  (0.1ms) begin transaction
1819
+ ------------------------------------------------------------
1820
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1821
+ ------------------------------------------------------------
1822
+  (0.0ms) SAVEPOINT active_record_1
1823
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1824
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1825
+  (0.0ms) SAVEPOINT active_record_1
1826
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1828
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1829
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1830
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1831
+  (0.6ms) rollback transaction
1832
+  (0.1ms) begin transaction
1833
+ ----------------------------------------------------------------------
1834
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1835
+ ----------------------------------------------------------------------
1836
+  (0.1ms) SAVEPOINT active_record_1
1837
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1838
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1839
+  (0.0ms) SAVEPOINT active_record_1
1840
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1841
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1842
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1843
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1844
+  (0.5ms) rollback transaction
1845
+  (0.0ms) begin transaction
1846
+ -------------------------------------------------------------------
1847
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1848
+ -------------------------------------------------------------------
1849
+  (0.0ms) SAVEPOINT active_record_1
1850
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1851
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1852
+  (0.0ms) SAVEPOINT active_record_1
1853
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1854
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1855
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1856
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1857
+  (0.7ms) rollback transaction
1858
+  (0.1ms) begin transaction
1859
+ -------------------------------------------------------------------------
1860
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1861
+ -------------------------------------------------------------------------
1862
+  (0.0ms) SAVEPOINT active_record_1
1863
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1865
+  (0.0ms) SAVEPOINT active_record_1
1866
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1867
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1868
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1869
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1870
+  (0.5ms) rollback transaction
1871
+  (0.3ms) begin transaction
1872
+ ----------------------------------------------
1873
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1874
+ ----------------------------------------------
1875
+  (0.0ms) SAVEPOINT active_record_1
1876
+ SQL (2.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1877
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1878
+  (0.1ms) SAVEPOINT active_record_1
1879
+ SQL (0.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1880
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1881
+ Block Load (0.3ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1882
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1883
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1884
+  (2.4ms) rollback transaction
1885
+  (0.1ms) begin transaction
1886
+ ---------------------------------------------
1887
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1888
+ ---------------------------------------------
1889
+  (0.0ms) SAVEPOINT active_record_1
1890
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1891
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1892
+  (0.0ms) SAVEPOINT active_record_1
1893
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1894
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1895
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1896
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1897
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1898
+  (0.9ms) rollback transaction
1899
+  (0.1ms) begin transaction
1900
+ --------------------------------------------------------------
1901
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
1902
+ --------------------------------------------------------------
1903
+  (0.1ms) SAVEPOINT active_record_1
1904
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1905
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1906
+  (0.0ms) SAVEPOINT active_record_1
1907
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1908
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1909
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1910
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1911
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1912
+  (0.7ms) rollback transaction
1913
+  (0.1ms) begin transaction
1914
+ ------------------------------------------------------------
1915
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
1916
+ ------------------------------------------------------------
1917
+  (0.0ms) SAVEPOINT active_record_1
1918
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1919
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1920
+  (0.0ms) SAVEPOINT active_record_1
1921
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1922
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1923
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
1924
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1925
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1926
+  (0.6ms) rollback transaction
1927
+  (0.1ms) begin transaction
1928
+ ----------------------------------------------------------------------
1929
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
1930
+ ----------------------------------------------------------------------
1931
+  (0.1ms) SAVEPOINT active_record_1
1932
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1933
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1934
+  (0.0ms) SAVEPOINT active_record_1
1935
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1936
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1937
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1938
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1939
+  (0.5ms) rollback transaction
1940
+  (0.1ms) begin transaction
1941
+ ------------------------------------------------------------------------------
1942
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
1943
+ ------------------------------------------------------------------------------
1944
+  (0.0ms) SAVEPOINT active_record_1
1945
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1946
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1947
+  (0.0ms) SAVEPOINT active_record_1
1948
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1949
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1950
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1951
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1952
+  (0.5ms) rollback transaction
1953
+  (0.1ms) begin transaction
1954
+ -------------------------------------------------------------------
1955
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
1956
+ -------------------------------------------------------------------
1957
+  (0.0ms) SAVEPOINT active_record_1
1958
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1959
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1960
+  (0.0ms) SAVEPOINT active_record_1
1961
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1962
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1963
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1964
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1965
+  (0.6ms) rollback transaction
1966
+  (0.1ms) begin transaction
1967
+ -------------------------------------------------------------------------
1968
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
1969
+ -------------------------------------------------------------------------
1970
+  (0.0ms) SAVEPOINT active_record_1
1971
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1972
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1973
+  (0.1ms) SAVEPOINT active_record_1
1974
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1975
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1976
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1977
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1978
+  (1.0ms) rollback transaction
1979
+  (0.3ms) begin transaction
1980
+ ----------------------------------------------
1981
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
1982
+ ----------------------------------------------
1983
+  (0.0ms) SAVEPOINT active_record_1
1984
+ SQL (2.1ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1985
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1986
+  (0.0ms) SAVEPOINT active_record_1
1987
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
1988
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1989
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
1990
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
1991
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
1992
+  (1.7ms) rollback transaction
1993
+  (0.1ms) begin transaction
1994
+ ---------------------------------------------
1995
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
1996
+ ---------------------------------------------
1997
+  (0.0ms) SAVEPOINT active_record_1
1998
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
1999
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2000
+  (0.0ms) SAVEPOINT active_record_1
2001
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2002
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2003
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2004
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2005
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2006
+  (0.6ms) rollback transaction
2007
+  (0.1ms) begin transaction
2008
+ --------------------------------------------------------------
2009
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2010
+ --------------------------------------------------------------
2011
+  (0.0ms) SAVEPOINT active_record_1
2012
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2013
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2014
+  (0.0ms) SAVEPOINT active_record_1
2015
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2016
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2017
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2018
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2019
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2020
+  (0.6ms) rollback transaction
2021
+  (0.1ms) begin transaction
2022
+ ------------------------------------------------------------
2023
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2024
+ ------------------------------------------------------------
2025
+  (0.1ms) SAVEPOINT active_record_1
2026
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2027
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2028
+  (0.0ms) SAVEPOINT active_record_1
2029
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2030
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2031
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2032
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2033
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2034
+  (0.5ms) rollback transaction
2035
+  (0.0ms) begin transaction
2036
+ ----------------------------------------------------------------------
2037
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2038
+ ----------------------------------------------------------------------
2039
+  (0.0ms) SAVEPOINT active_record_1
2040
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2041
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2042
+  (0.0ms) SAVEPOINT active_record_1
2043
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2044
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2045
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2046
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2047
+  (0.5ms) rollback transaction
2048
+  (0.1ms) begin transaction
2049
+ ------------------------------------------------------------------------------
2050
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2051
+ ------------------------------------------------------------------------------
2052
+  (0.0ms) SAVEPOINT active_record_1
2053
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2054
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2055
+  (0.1ms) SAVEPOINT active_record_1
2056
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2057
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2058
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2059
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2060
+  (0.6ms) rollback transaction
2061
+  (0.0ms) begin transaction
2062
+ -------------------------------------------------------------------
2063
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2064
+ -------------------------------------------------------------------
2065
+  (0.0ms) SAVEPOINT active_record_1
2066
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2067
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2068
+  (0.0ms) SAVEPOINT active_record_1
2069
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2070
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2071
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2072
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2073
+  (0.5ms) rollback transaction
2074
+  (0.0ms) begin transaction
2075
+ -------------------------------------------------------------------------
2076
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2077
+ -------------------------------------------------------------------------
2078
+  (0.0ms) SAVEPOINT active_record_1
2079
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2080
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2081
+  (0.0ms) SAVEPOINT active_record_1
2082
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2083
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2084
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2085
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2086
+  (0.5ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_ruintsti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ru/MuckRu