acts_as_ruintsti 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 265feb31bbd24ce5113fb1b8e9479e8d1cfdfae9
4
- data.tar.gz: 9d84665c2bd365a3e12903e6d6f71c39d5b2556c
3
+ metadata.gz: c4a1d538c2e288cba813318cc8ed3ce855cbb817
4
+ data.tar.gz: 800004520111e1b653f8ee012871735cfbcb98c8
5
5
  SHA512:
6
- metadata.gz: 1ea7377ce92b3cb82fb09c2637c273f10fdb035fd3ff7b36f935fd30523990755f90448e8adb0402206fce64d9b90df66365286f523bf908e3900fddf87e7536
7
- data.tar.gz: 01b146620ab928ece709ce4b533e9159b5a869b5ae8e841774626523bc733d8abf3801984bc715e46f313ec11d256bffb16e55363ed0d1705460de011fb9eeb0
6
+ metadata.gz: d9a26eafa8aab2c21cb7f885759eaab4014641ddbb93072ee79add5014f9d67c0dbf4ccd5832e63897eae7ce05751b0fa2ea5a38cb82089b6cbda23fb4ba792c
7
+ data.tar.gz: ddbb86541c2ce27f6eed916b64bb70aa5ac5f8f320151f178ff6395b739575818a7d9ce3cfe7f6132818515bb090dc61a6f18477cc5bb817495b82d144ca9163
@@ -8,23 +8,26 @@ module ActsAsRuintsti
8
8
  end
9
9
  end
10
10
  module ClassMethods
11
- @@acts_as_ruintsti_params = {}
11
+ def acts_as_ruintsti_params
12
+ @@acts_as_ruintsti_params[table_name]
13
+ end
12
14
  def acts_as_ruintsti_params=(params)
13
- @@acts_as_ruintsti_params = params
15
+ @@acts_as_ruintsti_params ||= {}
16
+ @@acts_as_ruintsti_params[table_name] = params
14
17
  end
15
18
  def sti_name
16
- n = @@acts_as_ruintsti_params.values.index(self.name.to_s)
17
- n ? @@acts_as_ruintsti_params.keys[n] : 0
19
+ n = acts_as_ruintsti_params.values.index(self.name.to_s)
20
+ n ? acts_as_ruintsti_params.keys[n] : 0
18
21
  end
19
22
  def find_sti_class(type_name)
20
- class_name = @@acts_as_ruintsti_params[type_name.to_i]
23
+ class_name = acts_as_ruintsti_params[type_name.to_i]
21
24
  class_name ? class_name.constantize : self
22
25
  end
23
26
  def subclass_from_attrs(attr)
24
27
  type_num = attr.with_indifferent_access[inheritance_column]
25
28
  if type_num.present?
26
29
  type_num = type_num.to_i if type_num.class == String and type_num =~ /\A\d+\z/
27
- subclass_name = @@acts_as_ruintsti_params[type_num]
30
+ subclass_name = acts_as_ruintsti_params[type_num]
28
31
  if subclass_name.present? && subclass_name != self.name
29
32
  subclass = subclass_name.safe_constantize
30
33
  unless descendants.include?(subclass)
@@ -1,3 +1,3 @@
1
1
  module ActsAsRuintsti
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,6 +1,15 @@
1
1
  # coding: utf-8
2
2
  require 'test_helper'
3
3
 
4
+ class Box < ActiveRecord::Base
5
+ acts_as_ruintsti({
6
+ 1 => 'WhiteBox',
7
+ 2 => 'BlackBox',
8
+ })
9
+ end
10
+ class WhiteBox < Box; end
11
+ class BlackBox < Box; end
12
+
4
13
  class Block < ActiveRecord::Base
5
14
  acts_as_ruintsti({
6
15
  1 => 'RedBlock',
@@ -10,6 +19,7 @@ end
10
19
  class RedBlock < Block; end
11
20
  class BlueBlock < Block; end
12
21
 
22
+
13
23
  class ActsAsRuintstiTest < ActiveSupport::TestCase
14
24
  def setup
15
25
  @red = RedBlock.new
@@ -62,4 +72,8 @@ class ActsAsRuintstiTest < ActiveSupport::TestCase
62
72
  Block.new(:type => 'hoge')
63
73
  end
64
74
  end
75
+
76
+ test "acts_as_ruintsti_params is different between Block and Box" do
77
+ assert_not_equal Block.acts_as_ruintsti_params, Box.acts_as_ruintsti_params
78
+ end
65
79
  end
@@ -1,7 +1,10 @@
1
1
  # encoding: UTF-8
2
2
 
3
- ActiveRecord::Schema.define(version: 1) do
3
+ ActiveRecord::Schema.define(version: 2) do
4
4
  create_table "blocks", force: true do |t|
5
5
  t.integer "type"
6
6
  end
7
+ create_table "boxes", force: true do |t|
8
+ t.integer "type"
9
+ end
7
10
  end
Binary file
@@ -7,3 +7,26 @@ Migrating to CreateWorks (0)
7
7
   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
8
8
   (0.1ms) SELECT version FROM "schema_migrations"
9
9
   (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
10
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
11
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
12
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
14
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
15
+  (0.1ms) SELECT version FROM "schema_migrations"
16
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
17
+  (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
18
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
19
+  (0.2ms) SELECT version FROM "schema_migrations"
20
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
21
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
22
+  (3.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
23
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
24
+  (0.1ms) SELECT version FROM "schema_migrations"
25
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
26
+  (2.9ms) CREATE TABLE "blocks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" integer) 
27
+  (1.0ms) CREATE TABLE "boxes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" integer)
28
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
29
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30
+  (0.2ms) SELECT version FROM "schema_migrations"
31
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('2')
32
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -2084,3 +2084,1022 @@ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2084
2084
  SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2085
2085
  SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2086
2086
   (0.5ms) rollback transaction
2087
+  (0.2ms) begin transaction
2088
+ ----------------------------------------------
2089
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2090
+ ----------------------------------------------
2091
+  (0.1ms) rollback transaction
2092
+  (0.0ms) begin transaction
2093
+ ---------------------------------------------
2094
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2095
+ ---------------------------------------------
2096
+  (0.0ms) rollback transaction
2097
+  (0.0ms) begin transaction
2098
+ --------------------------------------------------------------
2099
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2100
+ --------------------------------------------------------------
2101
+  (0.0ms) rollback transaction
2102
+  (0.0ms) begin transaction
2103
+ ------------------------------------------------------------
2104
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2105
+ ------------------------------------------------------------
2106
+  (0.0ms) rollback transaction
2107
+  (0.0ms) begin transaction
2108
+ ----------------------------------------------------------------------
2109
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2110
+ ----------------------------------------------------------------------
2111
+  (0.0ms) rollback transaction
2112
+  (0.0ms) begin transaction
2113
+ ------------------------------------------------------------------------------
2114
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2115
+ ------------------------------------------------------------------------------
2116
+  (0.0ms) rollback transaction
2117
+  (0.0ms) begin transaction
2118
+ -------------------------------------------------------------------
2119
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2120
+ -------------------------------------------------------------------
2121
+  (0.0ms) rollback transaction
2122
+  (0.0ms) begin transaction
2123
+ -------------------------------------------------------------------------
2124
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2125
+ -------------------------------------------------------------------------
2126
+  (0.0ms) rollback transaction
2127
+  (0.2ms) begin transaction
2128
+ ----------------------------------------------
2129
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2130
+ ----------------------------------------------
2131
+  (0.0ms) rollback transaction
2132
+  (0.0ms) begin transaction
2133
+ ---------------------------------------------
2134
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2135
+ ---------------------------------------------
2136
+  (0.0ms) rollback transaction
2137
+  (0.0ms) begin transaction
2138
+ --------------------------------------------------------------
2139
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2140
+ --------------------------------------------------------------
2141
+  (0.0ms) rollback transaction
2142
+  (0.1ms) begin transaction
2143
+ ------------------------------------------------------------
2144
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2145
+ ------------------------------------------------------------
2146
+  (0.0ms) rollback transaction
2147
+  (0.0ms) begin transaction
2148
+ ----------------------------------------------------------------------
2149
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2150
+ ----------------------------------------------------------------------
2151
+  (0.0ms) rollback transaction
2152
+  (0.0ms) begin transaction
2153
+ ------------------------------------------------------------------------------
2154
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2155
+ ------------------------------------------------------------------------------
2156
+  (0.0ms) rollback transaction
2157
+  (0.0ms) begin transaction
2158
+ -------------------------------------------------------------------
2159
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2160
+ -------------------------------------------------------------------
2161
+  (0.0ms) rollback transaction
2162
+  (0.0ms) begin transaction
2163
+ -------------------------------------------------------------------------
2164
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2165
+ -------------------------------------------------------------------------
2166
+  (0.0ms) rollback transaction
2167
+  (0.3ms) begin transaction
2168
+ ----------------------------------------------
2169
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2170
+ ----------------------------------------------
2171
+  (0.1ms) rollback transaction
2172
+  (0.0ms) begin transaction
2173
+ ---------------------------------------------
2174
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2175
+ ---------------------------------------------
2176
+  (0.0ms) rollback transaction
2177
+  (0.0ms) begin transaction
2178
+ --------------------------------------------------------------
2179
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2180
+ --------------------------------------------------------------
2181
+  (0.0ms) rollback transaction
2182
+  (0.0ms) begin transaction
2183
+ ------------------------------------------------------------
2184
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2185
+ ------------------------------------------------------------
2186
+  (0.0ms) rollback transaction
2187
+  (0.0ms) begin transaction
2188
+ ----------------------------------------------------------------------
2189
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2190
+ ----------------------------------------------------------------------
2191
+  (0.0ms) rollback transaction
2192
+  (0.0ms) begin transaction
2193
+ ------------------------------------------------------------------------------
2194
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2195
+ ------------------------------------------------------------------------------
2196
+  (0.0ms) rollback transaction
2197
+  (0.0ms) begin transaction
2198
+ -------------------------------------------------------------------
2199
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2200
+ -------------------------------------------------------------------
2201
+  (0.0ms) rollback transaction
2202
+  (0.0ms) begin transaction
2203
+ -------------------------------------------------------------------------
2204
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2205
+ -------------------------------------------------------------------------
2206
+  (0.0ms) rollback transaction
2207
+  (0.3ms) begin transaction
2208
+ ----------------------------------------------
2209
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2210
+ ----------------------------------------------
2211
+  (0.1ms) rollback transaction
2212
+  (0.0ms) begin transaction
2213
+ ---------------------------------------------
2214
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2215
+ ---------------------------------------------
2216
+  (0.0ms) rollback transaction
2217
+  (0.0ms) begin transaction
2218
+ --------------------------------------------------------------
2219
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2220
+ --------------------------------------------------------------
2221
+  (0.0ms) rollback transaction
2222
+  (0.0ms) begin transaction
2223
+ ------------------------------------------------------------
2224
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2225
+ ------------------------------------------------------------
2226
+  (0.0ms) rollback transaction
2227
+  (0.0ms) begin transaction
2228
+ ----------------------------------------------------------------------
2229
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2230
+ ----------------------------------------------------------------------
2231
+  (0.0ms) rollback transaction
2232
+  (0.0ms) begin transaction
2233
+ ------------------------------------------------------------------------------
2234
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2235
+ ------------------------------------------------------------------------------
2236
+  (0.0ms) rollback transaction
2237
+  (0.0ms) begin transaction
2238
+ -------------------------------------------------------------------
2239
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2240
+ -------------------------------------------------------------------
2241
+  (0.0ms) rollback transaction
2242
+  (0.1ms) begin transaction
2243
+ -------------------------------------------------------------------------
2244
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2245
+ -------------------------------------------------------------------------
2246
+  (0.0ms) rollback transaction
2247
+  (0.2ms) begin transaction
2248
+ ----------------------------------------------
2249
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2250
+ ----------------------------------------------
2251
+  (0.0ms) rollback transaction
2252
+  (0.0ms) begin transaction
2253
+ ---------------------------------------------
2254
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2255
+ ---------------------------------------------
2256
+  (0.0ms) rollback transaction
2257
+  (0.0ms) begin transaction
2258
+ --------------------------------------------------------------
2259
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2260
+ --------------------------------------------------------------
2261
+  (0.0ms) rollback transaction
2262
+  (0.0ms) begin transaction
2263
+ ------------------------------------------------------------
2264
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2265
+ ------------------------------------------------------------
2266
+  (0.0ms) rollback transaction
2267
+  (0.0ms) begin transaction
2268
+ ----------------------------------------------------------------------
2269
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2270
+ ----------------------------------------------------------------------
2271
+  (0.0ms) rollback transaction
2272
+  (0.0ms) begin transaction
2273
+ ------------------------------------------------------------------------------
2274
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2275
+ ------------------------------------------------------------------------------
2276
+  (0.0ms) rollback transaction
2277
+  (0.0ms) begin transaction
2278
+ -------------------------------------------------------------------
2279
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2280
+ -------------------------------------------------------------------
2281
+  (0.0ms) rollback transaction
2282
+  (0.0ms) begin transaction
2283
+ -------------------------------------------------------------------------
2284
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2285
+ -------------------------------------------------------------------------
2286
+  (0.0ms) rollback transaction
2287
+  (0.3ms) begin transaction
2288
+ ----------------------------------------------
2289
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2290
+ ----------------------------------------------
2291
+  (0.0ms) SAVEPOINT active_record_1
2292
+ SQL (3.8ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2294
+  (0.0ms) SAVEPOINT active_record_1
2295
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2296
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2297
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2298
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2299
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2300
+  (0.9ms) rollback transaction
2301
+  (0.1ms) begin transaction
2302
+ ---------------------------------------------
2303
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2304
+ ---------------------------------------------
2305
+  (0.1ms) SAVEPOINT active_record_1
2306
+ SQL (0.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2308
+  (0.1ms) SAVEPOINT active_record_1
2309
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2310
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2311
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2312
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2313
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2314
+  (0.6ms) rollback transaction
2315
+  (0.0ms) begin transaction
2316
+ --------------------------------------------------------------
2317
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2318
+ --------------------------------------------------------------
2319
+  (0.0ms) SAVEPOINT active_record_1
2320
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2322
+  (0.0ms) SAVEPOINT active_record_1
2323
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2324
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2325
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2326
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2327
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2328
+  (0.6ms) rollback transaction
2329
+  (0.0ms) begin transaction
2330
+ ------------------------------------------------------------
2331
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2332
+ ------------------------------------------------------------
2333
+  (0.0ms) SAVEPOINT active_record_1
2334
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2335
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2336
+  (0.0ms) SAVEPOINT active_record_1
2337
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2339
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2340
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2341
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2342
+  (0.5ms) rollback transaction
2343
+  (0.1ms) begin transaction
2344
+ ----------------------------------------------------------------------
2345
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2346
+ ----------------------------------------------------------------------
2347
+  (0.0ms) SAVEPOINT active_record_1
2348
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2350
+  (0.0ms) SAVEPOINT active_record_1
2351
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2352
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2353
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2354
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2355
+  (0.6ms) rollback transaction
2356
+  (0.1ms) begin transaction
2357
+ ------------------------------------------------------------------------------
2358
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2359
+ ------------------------------------------------------------------------------
2360
+  (0.0ms) SAVEPOINT active_record_1
2361
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2362
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2363
+  (0.0ms) SAVEPOINT active_record_1
2364
+ SQL (0.4ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2365
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2366
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2367
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2368
+  (0.7ms) rollback transaction
2369
+  (0.0ms) begin transaction
2370
+ -------------------------------------------------------------------
2371
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2372
+ -------------------------------------------------------------------
2373
+  (0.0ms) SAVEPOINT active_record_1
2374
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2375
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2376
+  (0.0ms) SAVEPOINT active_record_1
2377
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2378
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2379
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2380
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2381
+  (0.7ms) rollback transaction
2382
+  (0.0ms) begin transaction
2383
+ -------------------------------------------------------------------------
2384
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2385
+ -------------------------------------------------------------------------
2386
+  (0.0ms) SAVEPOINT active_record_1
2387
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2388
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2389
+  (0.0ms) SAVEPOINT active_record_1
2390
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2391
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2392
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2393
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2394
+  (0.6ms) rollback transaction
2395
+  (0.3ms) begin transaction
2396
+ ----------------------------------------------
2397
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2398
+ ----------------------------------------------
2399
+  (0.0ms) SAVEPOINT active_record_1
2400
+ SQL (1.9ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2401
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2402
+  (0.0ms) SAVEPOINT active_record_1
2403
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2404
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2405
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2406
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2407
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2408
+  (2.4ms) rollback transaction
2409
+  (0.1ms) begin transaction
2410
+ ---------------------------------------------
2411
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2412
+ ---------------------------------------------
2413
+  (0.1ms) SAVEPOINT active_record_1
2414
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2415
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2416
+  (0.0ms) SAVEPOINT active_record_1
2417
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2418
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2419
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2420
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2421
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2422
+  (0.5ms) rollback transaction
2423
+  (0.1ms) begin transaction
2424
+ --------------------------------------------------------------
2425
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2426
+ --------------------------------------------------------------
2427
+  (0.0ms) SAVEPOINT active_record_1
2428
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2429
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2430
+  (0.1ms) SAVEPOINT active_record_1
2431
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2432
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2433
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2434
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2435
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2436
+  (0.6ms) rollback transaction
2437
+  (0.1ms) begin transaction
2438
+ ------------------------------------------------------------
2439
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2440
+ ------------------------------------------------------------
2441
+  (0.0ms) SAVEPOINT active_record_1
2442
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2443
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2444
+  (0.0ms) SAVEPOINT active_record_1
2445
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2446
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2447
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2448
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2449
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2450
+  (0.6ms) rollback transaction
2451
+  (0.0ms) begin transaction
2452
+ ----------------------------------------------------------------------
2453
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2454
+ ----------------------------------------------------------------------
2455
+  (0.0ms) SAVEPOINT active_record_1
2456
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2457
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2458
+  (0.0ms) SAVEPOINT active_record_1
2459
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2460
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2461
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2462
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2463
+  (0.6ms) rollback transaction
2464
+  (0.1ms) begin transaction
2465
+ ------------------------------------------------------------------------------
2466
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2467
+ ------------------------------------------------------------------------------
2468
+  (0.0ms) SAVEPOINT active_record_1
2469
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2470
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2471
+  (0.0ms) SAVEPOINT active_record_1
2472
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2473
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2474
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2475
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2476
+  (0.4ms) rollback transaction
2477
+  (0.0ms) begin transaction
2478
+ -------------------------------------------------------------------
2479
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2480
+ -------------------------------------------------------------------
2481
+  (0.0ms) SAVEPOINT active_record_1
2482
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2484
+  (0.0ms) SAVEPOINT active_record_1
2485
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2487
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2488
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2489
+  (0.7ms) rollback transaction
2490
+  (0.0ms) begin transaction
2491
+ -------------------------------------------------------------------------
2492
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2493
+ -------------------------------------------------------------------------
2494
+  (0.0ms) SAVEPOINT active_record_1
2495
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2496
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2497
+  (0.0ms) SAVEPOINT active_record_1
2498
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2499
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2500
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2501
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2502
+  (0.7ms) rollback transaction
2503
+  (0.3ms) begin transaction
2504
+ ----------------------------------------------
2505
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2506
+ ----------------------------------------------
2507
+  (0.0ms) SAVEPOINT active_record_1
2508
+ SQL (1.9ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2509
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2510
+  (0.0ms) SAVEPOINT active_record_1
2511
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2513
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2514
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2515
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2516
+  (1.7ms) rollback transaction
2517
+  (0.1ms) begin transaction
2518
+ ---------------------------------------------
2519
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2520
+ ---------------------------------------------
2521
+  (0.0ms) SAVEPOINT active_record_1
2522
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2523
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2524
+  (0.0ms) SAVEPOINT active_record_1
2525
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2526
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2527
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2528
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2529
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2530
+  (0.5ms) rollback transaction
2531
+  (0.1ms) begin transaction
2532
+ -----------------------------------------------------------------------------------
2533
+ ActsAsRuintstiTest: test_acts_as_ruintsti_params_is_different_between_Block_and_Box
2534
+ -----------------------------------------------------------------------------------
2535
+  (0.0ms) SAVEPOINT active_record_1
2536
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2537
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2538
+  (0.0ms) SAVEPOINT active_record_1
2539
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2540
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2541
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2542
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2543
+  (0.5ms) rollback transaction
2544
+  (0.1ms) begin transaction
2545
+ --------------------------------------------------------------
2546
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2547
+ --------------------------------------------------------------
2548
+  (0.1ms) SAVEPOINT active_record_1
2549
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2550
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2551
+  (0.0ms) SAVEPOINT active_record_1
2552
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2553
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2554
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2555
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2556
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2557
+  (0.6ms) rollback transaction
2558
+  (0.0ms) begin transaction
2559
+ ------------------------------------------------------------
2560
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2561
+ ------------------------------------------------------------
2562
+  (0.0ms) SAVEPOINT active_record_1
2563
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2565
+  (0.0ms) SAVEPOINT active_record_1
2566
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2567
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2568
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2569
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2570
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2571
+  (0.6ms) rollback transaction
2572
+  (0.0ms) begin transaction
2573
+ ----------------------------------------------------------------------
2574
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2575
+ ----------------------------------------------------------------------
2576
+  (0.0ms) SAVEPOINT active_record_1
2577
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2579
+  (0.1ms) SAVEPOINT active_record_1
2580
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2581
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2582
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2583
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2584
+  (0.5ms) rollback transaction
2585
+  (0.0ms) begin transaction
2586
+ ------------------------------------------------------------------------------
2587
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2588
+ ------------------------------------------------------------------------------
2589
+  (0.1ms) SAVEPOINT active_record_1
2590
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2591
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2592
+  (0.1ms) SAVEPOINT active_record_1
2593
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2594
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2595
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2596
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2597
+  (0.6ms) rollback transaction
2598
+  (0.1ms) begin transaction
2599
+ -------------------------------------------------------------------
2600
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2601
+ -------------------------------------------------------------------
2602
+  (0.0ms) SAVEPOINT active_record_1
2603
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2604
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2605
+  (0.0ms) SAVEPOINT active_record_1
2606
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2607
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2608
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2609
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2610
+  (0.6ms) rollback transaction
2611
+  (0.0ms) begin transaction
2612
+ -------------------------------------------------------------------------
2613
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2614
+ -------------------------------------------------------------------------
2615
+  (0.0ms) SAVEPOINT active_record_1
2616
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2617
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2618
+  (0.0ms) SAVEPOINT active_record_1
2619
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2621
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2622
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2623
+  (0.5ms) rollback transaction
2624
+  (0.3ms) begin transaction
2625
+ ----------------------------------------------
2626
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2627
+ ----------------------------------------------
2628
+  (0.0ms) SAVEPOINT active_record_1
2629
+ SQL (2.6ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2630
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2631
+  (0.0ms) SAVEPOINT active_record_1
2632
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2633
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2634
+ SQL (0.4ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2635
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2636
+  (0.6ms) rollback transaction
2637
+  (0.1ms) begin transaction
2638
+ ---------------------------------------------
2639
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2640
+ ---------------------------------------------
2641
+  (0.0ms) SAVEPOINT active_record_1
2642
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2643
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2644
+  (0.0ms) SAVEPOINT active_record_1
2645
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2646
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2647
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2648
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2649
+  (0.5ms) rollback transaction
2650
+  (0.1ms) begin transaction
2651
+ -----------------------------------------------------------------------------------
2652
+ ActsAsRuintstiTest: test_acts_as_ruintsti_params_is_different_between_Block_and_Box
2653
+ -----------------------------------------------------------------------------------
2654
+  (0.1ms) SAVEPOINT active_record_1
2655
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2656
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2657
+  (0.0ms) SAVEPOINT active_record_1
2658
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2659
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2660
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2661
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2662
+  (0.5ms) rollback transaction
2663
+  (0.1ms) begin transaction
2664
+ --------------------------------------------------------------
2665
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2666
+ --------------------------------------------------------------
2667
+  (0.1ms) SAVEPOINT active_record_1
2668
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2669
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2670
+  (0.0ms) SAVEPOINT active_record_1
2671
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2672
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2673
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2674
+ SQL (0.3ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2675
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2676
+  (0.6ms) rollback transaction
2677
+  (0.1ms) begin transaction
2678
+ ------------------------------------------------------------
2679
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2680
+ ------------------------------------------------------------
2681
+  (0.1ms) SAVEPOINT active_record_1
2682
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2683
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2684
+  (0.1ms) SAVEPOINT active_record_1
2685
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2686
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2687
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2688
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2689
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2690
+  (0.5ms) rollback transaction
2691
+  (0.0ms) begin transaction
2692
+ ----------------------------------------------------------------------
2693
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2694
+ ----------------------------------------------------------------------
2695
+  (0.0ms) SAVEPOINT active_record_1
2696
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2697
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2698
+  (0.2ms) SAVEPOINT active_record_1
2699
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2700
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2701
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2702
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2703
+  (0.7ms) rollback transaction
2704
+  (0.1ms) begin transaction
2705
+ ------------------------------------------------------------------------------
2706
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2707
+ ------------------------------------------------------------------------------
2708
+  (0.1ms) SAVEPOINT active_record_1
2709
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2710
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2711
+  (0.0ms) SAVEPOINT active_record_1
2712
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2713
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2714
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2715
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2716
+  (0.6ms) rollback transaction
2717
+  (0.1ms) begin transaction
2718
+ -------------------------------------------------------------------
2719
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2720
+ -------------------------------------------------------------------
2721
+  (0.1ms) SAVEPOINT active_record_1
2722
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2723
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2724
+  (0.0ms) SAVEPOINT active_record_1
2725
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2726
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2727
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2728
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2729
+  (0.7ms) rollback transaction
2730
+  (0.1ms) begin transaction
2731
+ -------------------------------------------------------------------------
2732
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2733
+ -------------------------------------------------------------------------
2734
+  (0.1ms) SAVEPOINT active_record_1
2735
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2736
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2737
+  (0.0ms) SAVEPOINT active_record_1
2738
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 0]]
2739
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2740
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 1
2741
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (0) AND "blocks"."id" = 2
2742
+  (0.6ms) rollback transaction
2743
+  (0.3ms) begin transaction
2744
+ ----------------------------------------------
2745
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2746
+ ----------------------------------------------
2747
+  (0.0ms) SAVEPOINT active_record_1
2748
+ SQL (2.9ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2749
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2750
+  (0.0ms) SAVEPOINT active_record_1
2751
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2752
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2753
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2754
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2755
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2756
+  (1.9ms) rollback transaction
2757
+  (0.1ms) begin transaction
2758
+ ---------------------------------------------
2759
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2760
+ ---------------------------------------------
2761
+  (0.1ms) SAVEPOINT active_record_1
2762
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2763
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2764
+  (0.0ms) SAVEPOINT active_record_1
2765
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2766
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2767
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2768
+ SQL (0.2ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2769
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2770
+  (0.6ms) rollback transaction
2771
+  (0.1ms) begin transaction
2772
+ -----------------------------------------------------------------------------------
2773
+ ActsAsRuintstiTest: test_acts_as_ruintsti_params_is_different_between_Block_and_Box
2774
+ -----------------------------------------------------------------------------------
2775
+  (0.0ms) SAVEPOINT active_record_1
2776
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2777
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2778
+  (0.0ms) SAVEPOINT active_record_1
2779
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2780
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2781
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2782
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2783
+  (0.6ms) rollback transaction
2784
+  (0.1ms) begin transaction
2785
+ --------------------------------------------------------------
2786
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2787
+ --------------------------------------------------------------
2788
+  (0.0ms) SAVEPOINT active_record_1
2789
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2790
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2791
+  (0.0ms) SAVEPOINT active_record_1
2792
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2793
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2794
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2795
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2796
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2797
+  (0.4ms) rollback transaction
2798
+  (0.0ms) begin transaction
2799
+ ------------------------------------------------------------
2800
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2801
+ ------------------------------------------------------------
2802
+  (0.1ms) SAVEPOINT active_record_1
2803
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2805
+  (0.0ms) SAVEPOINT active_record_1
2806
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2807
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2808
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2809
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2810
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2811
+  (0.5ms) rollback transaction
2812
+  (0.1ms) begin transaction
2813
+ ----------------------------------------------------------------------
2814
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2815
+ ----------------------------------------------------------------------
2816
+  (0.1ms) SAVEPOINT active_record_1
2817
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2818
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2819
+  (0.0ms) SAVEPOINT active_record_1
2820
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2822
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2823
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2824
+  (0.7ms) rollback transaction
2825
+  (0.1ms) begin transaction
2826
+ ------------------------------------------------------------------------------
2827
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2828
+ ------------------------------------------------------------------------------
2829
+  (0.0ms) SAVEPOINT active_record_1
2830
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2831
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2832
+  (0.0ms) SAVEPOINT active_record_1
2833
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2834
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2835
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2836
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2837
+  (0.7ms) rollback transaction
2838
+  (0.1ms) begin transaction
2839
+ -------------------------------------------------------------------
2840
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2841
+ -------------------------------------------------------------------
2842
+  (0.0ms) SAVEPOINT active_record_1
2843
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2844
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2845
+  (0.0ms) SAVEPOINT active_record_1
2846
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2847
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2848
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2849
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2850
+  (0.6ms) rollback transaction
2851
+  (0.0ms) begin transaction
2852
+ -------------------------------------------------------------------------
2853
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2854
+ -------------------------------------------------------------------------
2855
+  (0.0ms) SAVEPOINT active_record_1
2856
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2857
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2858
+  (0.0ms) SAVEPOINT active_record_1
2859
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2860
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2861
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2862
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2863
+  (0.4ms) rollback transaction
2864
+  (0.3ms) begin transaction
2865
+ ----------------------------------------------
2866
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2867
+ ----------------------------------------------
2868
+  (0.1ms) SAVEPOINT active_record_1
2869
+ SQL (1.9ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2870
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2871
+  (0.0ms) SAVEPOINT active_record_1
2872
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2873
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2874
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2875
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2876
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2877
+  (1.9ms) rollback transaction
2878
+  (0.1ms) begin transaction
2879
+ ---------------------------------------------
2880
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
2881
+ ---------------------------------------------
2882
+  (0.0ms) SAVEPOINT active_record_1
2883
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2884
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2885
+  (0.0ms) SAVEPOINT active_record_1
2886
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2887
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2888
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2889
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2890
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2891
+  (0.5ms) rollback transaction
2892
+  (0.1ms) begin transaction
2893
+ -----------------------------------------------------------------------------------
2894
+ ActsAsRuintstiTest: test_acts_as_ruintsti_params_is_different_between_Block_and_Box
2895
+ -----------------------------------------------------------------------------------
2896
+  (0.1ms) SAVEPOINT active_record_1
2897
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2898
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2899
+  (0.1ms) SAVEPOINT active_record_1
2900
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2901
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2902
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2903
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2904
+  (0.6ms) rollback transaction
2905
+  (0.1ms) begin transaction
2906
+ --------------------------------------------------------------
2907
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
2908
+ --------------------------------------------------------------
2909
+  (0.0ms) SAVEPOINT active_record_1
2910
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2911
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2912
+  (0.0ms) SAVEPOINT active_record_1
2913
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2914
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2915
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2916
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2917
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2918
+  (0.5ms) rollback transaction
2919
+  (0.1ms) begin transaction
2920
+ ------------------------------------------------------------
2921
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
2922
+ ------------------------------------------------------------
2923
+  (0.0ms) SAVEPOINT active_record_1
2924
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2926
+  (0.0ms) SAVEPOINT active_record_1
2927
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2928
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2929
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
2930
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2931
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2932
+  (0.6ms) rollback transaction
2933
+  (0.0ms) begin transaction
2934
+ ----------------------------------------------------------------------
2935
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
2936
+ ----------------------------------------------------------------------
2937
+  (0.1ms) SAVEPOINT active_record_1
2938
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2939
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2940
+  (0.1ms) SAVEPOINT active_record_1
2941
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2942
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2943
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2944
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2945
+  (0.6ms) rollback transaction
2946
+  (0.0ms) begin transaction
2947
+ ------------------------------------------------------------------------------
2948
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
2949
+ ------------------------------------------------------------------------------
2950
+  (0.0ms) SAVEPOINT active_record_1
2951
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2952
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2953
+  (0.0ms) SAVEPOINT active_record_1
2954
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2955
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2956
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2957
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2958
+  (0.5ms) rollback transaction
2959
+  (0.0ms) begin transaction
2960
+ -------------------------------------------------------------------
2961
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
2962
+ -------------------------------------------------------------------
2963
+  (0.0ms) SAVEPOINT active_record_1
2964
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2965
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2966
+  (0.0ms) SAVEPOINT active_record_1
2967
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2968
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2969
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2970
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2971
+  (0.5ms) rollback transaction
2972
+  (0.1ms) begin transaction
2973
+ -------------------------------------------------------------------------
2974
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
2975
+ -------------------------------------------------------------------------
2976
+  (0.0ms) SAVEPOINT active_record_1
2977
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2978
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2979
+  (0.0ms) SAVEPOINT active_record_1
2980
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2981
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2982
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2983
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2984
+  (0.5ms) rollback transaction
2985
+  (0.3ms) begin transaction
2986
+ ----------------------------------------------
2987
+ ActsAsRuintstiTest: test_BlueBlock's_type_is_2
2988
+ ----------------------------------------------
2989
+  (0.0ms) SAVEPOINT active_record_1
2990
+ SQL (2.0ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
2991
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2992
+  (0.0ms) SAVEPOINT active_record_1
2993
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
2994
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2995
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
2996
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
2997
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
2998
+  (1.9ms) rollback transaction
2999
+  (0.1ms) begin transaction
3000
+ ---------------------------------------------
3001
+ ActsAsRuintstiTest: test_RedBlock's_type_is_1
3002
+ ---------------------------------------------
3003
+  (0.0ms) SAVEPOINT active_record_1
3004
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3005
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3006
+  (0.0ms) SAVEPOINT active_record_1
3007
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3009
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
3010
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3011
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3012
+  (0.5ms) rollback transaction
3013
+  (0.1ms) begin transaction
3014
+ -----------------------------------------------------------------------------------
3015
+ ActsAsRuintstiTest: test_acts_as_ruintsti_params_is_different_between_Block_and_Box
3016
+ -----------------------------------------------------------------------------------
3017
+  (0.0ms) SAVEPOINT active_record_1
3018
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3019
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3020
+  (0.0ms) SAVEPOINT active_record_1
3021
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3022
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3023
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3024
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3025
+  (0.6ms) rollback transaction
3026
+  (0.1ms) begin transaction
3027
+ --------------------------------------------------------------
3028
+ ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
3029
+ --------------------------------------------------------------
3030
+  (0.0ms) SAVEPOINT active_record_1
3031
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3032
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3033
+  (0.0ms) SAVEPOINT active_record_1
3034
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3035
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3036
+ Block Load (0.1ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
3037
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3038
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3039
+  (0.6ms) rollback transaction
3040
+  (0.1ms) begin transaction
3041
+ ------------------------------------------------------------
3042
+ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
3043
+ ------------------------------------------------------------
3044
+  (0.0ms) SAVEPOINT active_record_1
3045
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3046
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3047
+  (0.0ms) SAVEPOINT active_record_1
3048
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3049
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3050
+ Block Load (0.0ms) SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 1]]
3051
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3052
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3053
+  (0.5ms) rollback transaction
3054
+  (0.1ms) begin transaction
3055
+ ----------------------------------------------------------------------
3056
+ ActsAsRuintstiTest: test_when_create_block_type='2',_created_BlueBlock
3057
+ ----------------------------------------------------------------------
3058
+  (0.1ms) SAVEPOINT active_record_1
3059
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3060
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3061
+  (0.0ms) SAVEPOINT active_record_1
3062
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3063
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3064
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3065
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3066
+  (0.7ms) rollback transaction
3067
+  (0.0ms) begin transaction
3068
+ ------------------------------------------------------------------------------
3069
+ ActsAsRuintstiTest: test_when_create_block_type='hoge',_raise_SubclassNotFound
3070
+ ------------------------------------------------------------------------------
3071
+  (0.0ms) SAVEPOINT active_record_1
3072
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3073
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3074
+  (0.0ms) SAVEPOINT active_record_1
3075
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3076
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3077
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3078
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3079
+  (0.6ms) rollback transaction
3080
+  (0.0ms) begin transaction
3081
+ -------------------------------------------------------------------
3082
+ ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
3083
+ -------------------------------------------------------------------
3084
+  (0.0ms) SAVEPOINT active_record_1
3085
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3086
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3087
+  (0.0ms) SAVEPOINT active_record_1
3088
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3089
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3090
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3091
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3092
+  (0.6ms) rollback transaction
3093
+  (0.0ms) begin transaction
3094
+ -------------------------------------------------------------------------
3095
+ ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
3096
+ -------------------------------------------------------------------------
3097
+  (0.0ms) SAVEPOINT active_record_1
3098
+ SQL (0.3ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
3099
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3100
+  (0.0ms) SAVEPOINT active_record_1
3101
+ SQL (0.2ms) INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
3102
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3103
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
3104
+ SQL (0.1ms) DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
3105
+  (0.7ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_ruintsti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ru/MuckRu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-22 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails