acts_as_ruintsti 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acts_as_ruintsti.rb +15 -0
- data/lib/acts_as_ruintsti/version.rb +1 -1
- data/test/acts_as_ruintsti_test.rb +14 -0
- data/test/dummy/log/test.log +479 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55bb3314bf2df45e9499ba3e5eeee0b1f9284f24
|
4
|
+
data.tar.gz: d7e538b5a7645963bf35e272b1333c44d548bd7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 758ae15f828db1c2404fa2b4da586e64e77f965f17063dbb9d2069610c8ad46d989e16a26a28d44c2ba5a507e1b0eaaa2f62dcdfb4e1529bbc329a947d01119e
|
7
|
+
data.tar.gz: 8b454285c0bb588cdef465d9b75ee164ee268d4adcc513782475da16bc4529453462ba78f79f965f6005f75b74c6c000c655a528d002004d2a6f381c8f5c11ba
|
data/lib/acts_as_ruintsti.rb
CHANGED
@@ -20,6 +20,21 @@ module ActsAsRuintsti
|
|
20
20
|
class_name = @@acts_as_ruintsti_params[type_name.to_i]
|
21
21
|
class_name ? class_name.constantize : self
|
22
22
|
end
|
23
|
+
def subclass_from_attrs(attr)
|
24
|
+
type_num = attr.with_indifferent_access[inheritance_column]
|
25
|
+
if type_num.present?
|
26
|
+
subclass_name = @@acts_as_ruintsti_params[type_num]
|
27
|
+
if subclass_name.present? && subclass_name != self.name
|
28
|
+
subclass = subclass_name.safe_constantize
|
29
|
+
unless descendants.include?(subclass)
|
30
|
+
raise ActiveRecord::SubclassNotFound.new("Invalid single-table inheritance type: #{subclass_name} is not a subclass of #{name}")
|
31
|
+
end
|
32
|
+
subclass
|
33
|
+
elsif subclass_name.blank?
|
34
|
+
raise ActiveRecord::SubclassNotFound.new("Invalid single-table inheritance type number: #{type_num} is not a subclass of #{name}")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
23
38
|
end
|
24
39
|
end
|
25
40
|
|
@@ -42,4 +42,18 @@ class ActsAsRuintstiTest < ActiveSupport::TestCase
|
|
42
42
|
test "loaded BlueBlock's class is BlueBlock" do
|
43
43
|
assert_equal Block.find(@blue.id).class, BlueBlock
|
44
44
|
end
|
45
|
+
|
46
|
+
test "when create block type=1, created RedBlock" do
|
47
|
+
assert_equal Block.new(:type => 1).class, RedBlock
|
48
|
+
end
|
49
|
+
|
50
|
+
test "when create block type=2, created BlueBlock" do
|
51
|
+
assert_equal Block.new(:type => 2).class, BlueBlock
|
52
|
+
end
|
53
|
+
|
54
|
+
test "when create block type=3, raise SubclassNotFound" do
|
55
|
+
assert_raise ActiveRecord::SubclassNotFound do
|
56
|
+
Block.new(:type => 3)
|
57
|
+
end
|
58
|
+
end
|
45
59
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -819,3 +819,482 @@ ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
|
819
819
|
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
820
820
|
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
821
821
|
[1m[35m (0.6ms)[0m rollback transaction
|
822
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
823
|
+
----------------------------------------------
|
824
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
825
|
+
----------------------------------------------
|
826
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
827
|
+
[1m[36mSQL (4.8ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
828
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
829
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
830
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
831
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
832
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
833
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
834
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
835
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
836
|
+
[1m[35m (0.1ms)[0m begin transaction
|
837
|
+
---------------------------------------------
|
838
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
839
|
+
---------------------------------------------
|
840
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
841
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
842
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
843
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
844
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
845
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
846
|
+
[1m[36mBlock Load (0.1ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
847
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
848
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
849
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
850
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
851
|
+
--------------------------------------------------------------
|
852
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
853
|
+
--------------------------------------------------------------
|
854
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
855
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
856
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
857
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
858
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
859
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
860
|
+
[1m[35mBlock Load (0.0ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
861
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
862
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
863
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
864
|
+
[1m[35m (0.1ms)[0m begin transaction
|
865
|
+
------------------------------------------------------------
|
866
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
867
|
+
------------------------------------------------------------
|
868
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
869
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
870
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
871
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
872
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
873
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
874
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
875
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
876
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
877
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
878
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
879
|
+
--------------------------------------------------------------------
|
880
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
881
|
+
--------------------------------------------------------------------
|
882
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
883
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
884
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
885
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
886
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
887
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
888
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
889
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
890
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
891
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
892
|
+
----------------------------------------------
|
893
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
894
|
+
----------------------------------------------
|
895
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
896
|
+
[1m[36mSQL (2.1ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
897
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
898
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
899
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
900
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
901
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
902
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
903
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
904
|
+
[1m[36m (2.7ms)[0m [1mrollback transaction[0m
|
905
|
+
[1m[35m (0.1ms)[0m begin transaction
|
906
|
+
---------------------------------------------
|
907
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
908
|
+
---------------------------------------------
|
909
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
910
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
911
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
912
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
913
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
914
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
915
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
916
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
917
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
918
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
919
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
920
|
+
--------------------------------------------------------------
|
921
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
922
|
+
--------------------------------------------------------------
|
923
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
924
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
925
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
926
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
927
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
928
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
929
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
930
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
931
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
932
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
933
|
+
[1m[35m (0.0ms)[0m begin transaction
|
934
|
+
------------------------------------------------------------
|
935
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
936
|
+
------------------------------------------------------------
|
937
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
938
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
939
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
940
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
941
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
942
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
943
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
944
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
945
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
946
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
947
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
948
|
+
--------------------------------------------------------------------
|
949
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
950
|
+
--------------------------------------------------------------------
|
951
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
952
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
953
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
954
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
955
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
956
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
957
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
958
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
959
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
960
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
961
|
+
----------------------------------------------
|
962
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
963
|
+
----------------------------------------------
|
964
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
965
|
+
[1m[36mSQL (2.1ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
966
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
967
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
968
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
969
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
970
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
971
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
972
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
973
|
+
[1m[36m (2.5ms)[0m [1mrollback transaction[0m
|
974
|
+
[1m[35m (0.1ms)[0m begin transaction
|
975
|
+
---------------------------------------------
|
976
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
977
|
+
---------------------------------------------
|
978
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
979
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
980
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
981
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
982
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
983
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
984
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
985
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
986
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
987
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
988
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
989
|
+
--------------------------------------------------------------
|
990
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
991
|
+
--------------------------------------------------------------
|
992
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
993
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
994
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
995
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
996
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
997
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
998
|
+
[1m[35mBlock Load (0.0ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
999
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1000
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1001
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1002
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1003
|
+
------------------------------------------------------------
|
1004
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
1005
|
+
------------------------------------------------------------
|
1006
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1007
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1008
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1009
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1010
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1011
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1012
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1013
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1014
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1015
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1016
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1017
|
+
--------------------------------------------------------------------
|
1018
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
1019
|
+
--------------------------------------------------------------------
|
1020
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1021
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1022
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1023
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1024
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1025
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1026
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1027
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1028
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1029
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1030
|
+
----------------------------------------------
|
1031
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
1032
|
+
----------------------------------------------
|
1033
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1034
|
+
[1m[36mSQL (2.1ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1035
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1036
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1037
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1038
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1039
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1040
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1041
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1042
|
+
[1m[36m (2.8ms)[0m [1mrollback transaction[0m
|
1043
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1044
|
+
---------------------------------------------
|
1045
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
1046
|
+
---------------------------------------------
|
1047
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1048
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1049
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1050
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1051
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1052
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1053
|
+
[1m[36mBlock Load (0.1ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1054
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1055
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1056
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1057
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1058
|
+
--------------------------------------------------------------
|
1059
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
1060
|
+
--------------------------------------------------------------
|
1061
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1062
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1063
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1064
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1065
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1066
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1067
|
+
[1m[35mBlock Load (0.0ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1068
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1069
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1070
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1071
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1072
|
+
------------------------------------------------------------
|
1073
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
1074
|
+
------------------------------------------------------------
|
1075
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1076
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1077
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1078
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1079
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1080
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1081
|
+
[1m[36mBlock Load (0.1ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1082
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1083
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1084
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1085
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1086
|
+
-------------------------------------------------------------------
|
1087
|
+
ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
|
1088
|
+
-------------------------------------------------------------------
|
1089
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1090
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1091
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1092
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1093
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1094
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1095
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1096
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1097
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1098
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1099
|
+
--------------------------------------------------------------------
|
1100
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
1101
|
+
--------------------------------------------------------------------
|
1102
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1103
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1104
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1105
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1106
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1107
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1108
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1109
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1110
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1111
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1112
|
+
----------------------------------------------
|
1113
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
1114
|
+
----------------------------------------------
|
1115
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1116
|
+
[1m[36mSQL (2.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1117
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1118
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1119
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1120
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1121
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1122
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1123
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1124
|
+
[1m[36m (2.6ms)[0m [1mrollback transaction[0m
|
1125
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1126
|
+
---------------------------------------------
|
1127
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
1128
|
+
---------------------------------------------
|
1129
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1130
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1131
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1132
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1133
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1134
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1135
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1136
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1137
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1138
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1139
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1140
|
+
--------------------------------------------------------------
|
1141
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
1142
|
+
--------------------------------------------------------------
|
1143
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1144
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1145
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1146
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1147
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1148
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1149
|
+
[1m[35mBlock Load (0.0ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1150
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1151
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1152
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1153
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1154
|
+
------------------------------------------------------------
|
1155
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
1156
|
+
------------------------------------------------------------
|
1157
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1158
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1159
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1160
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1161
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1162
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1163
|
+
[1m[36mBlock Load (0.1ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1164
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1165
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1166
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1167
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1168
|
+
-------------------------------------------------------------------
|
1169
|
+
ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
|
1170
|
+
-------------------------------------------------------------------
|
1171
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1172
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1173
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1174
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1175
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1176
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1177
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1178
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1179
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1180
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1181
|
+
--------------------------------------------------------------------
|
1182
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
1183
|
+
--------------------------------------------------------------------
|
1184
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1185
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1186
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1187
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1188
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1189
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1190
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1191
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1192
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1193
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1194
|
+
-------------------------------------------------------------------------
|
1195
|
+
ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
|
1196
|
+
-------------------------------------------------------------------------
|
1197
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1198
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1199
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1200
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1201
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1202
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1203
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1204
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1205
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1206
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1207
|
+
----------------------------------------------
|
1208
|
+
ActsAsRuintstiTest: test_BlueBlock's_type_is_2
|
1209
|
+
----------------------------------------------
|
1210
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1211
|
+
[1m[36mSQL (2.3ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1212
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1213
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1214
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1215
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1216
|
+
[1m[35mBlock Load (0.1ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1217
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1218
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1219
|
+
[1m[36m (2.0ms)[0m [1mrollback transaction[0m
|
1220
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1221
|
+
---------------------------------------------
|
1222
|
+
ActsAsRuintstiTest: test_RedBlock's_type_is_1
|
1223
|
+
---------------------------------------------
|
1224
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1225
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1226
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1227
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1228
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1229
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1230
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1231
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1232
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1233
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1234
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1235
|
+
--------------------------------------------------------------
|
1236
|
+
ActsAsRuintstiTest: test_loaded_BlueBlock's_class_is_BlueBlock
|
1237
|
+
--------------------------------------------------------------
|
1238
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1239
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1240
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1241
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1242
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1243
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1244
|
+
[1m[35mBlock Load (0.0ms)[0m SELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1 [["id", 2]]
|
1245
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1[0m
|
1246
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2
|
1247
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
1248
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1249
|
+
------------------------------------------------------------
|
1250
|
+
ActsAsRuintstiTest: test_loaded_RedBlock's_class_is_RedBlock
|
1251
|
+
------------------------------------------------------------
|
1252
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1253
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 1]]
|
1254
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1255
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1256
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 2]]
|
1257
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1258
|
+
[1m[36mBlock Load (0.0ms)[0m [1mSELECT "blocks".* FROM "blocks" WHERE "blocks"."id" = ? LIMIT 1[0m [["id", 1]]
|
1259
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1260
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1261
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1262
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1263
|
+
-------------------------------------------------------------------
|
1264
|
+
ActsAsRuintstiTest: test_when_create_block_type=1,_created_RedBlock
|
1265
|
+
-------------------------------------------------------------------
|
1266
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1267
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1268
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1269
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1270
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1271
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1272
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1273
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1274
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1275
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1276
|
+
--------------------------------------------------------------------
|
1277
|
+
ActsAsRuintstiTest: test_when_create_block_type=2,_created_BlueBlock
|
1278
|
+
--------------------------------------------------------------------
|
1279
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1280
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1281
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1282
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1283
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1284
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1285
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1286
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1287
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1288
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1289
|
+
-------------------------------------------------------------------------
|
1290
|
+
ActsAsRuintstiTest: test_when_create_block_type=3,_raise_SubclassNotFound
|
1291
|
+
-------------------------------------------------------------------------
|
1292
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1293
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "blocks" ("type") VALUES (?)[0m [["type", 1]]
|
1294
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1295
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1296
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "blocks" ("type") VALUES (?) [["type", 2]]
|
1297
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1298
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "blocks" WHERE "blocks"."type" IN (1) AND "blocks"."id" = 1
|
1299
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "blocks" WHERE "blocks"."type" IN (2) AND "blocks"."id" = 2[0m
|
1300
|
+
[1m[35m (0.6ms)[0m 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.
|
4
|
+
version: 0.0.2
|
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-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|