enum_state_machine 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/enum_state_machine.gemspec +4 -6
- data/lib/enum_state_machine/integrations/active_model.rb +23 -24
- data/lib/enum_state_machine/version.rb +1 -1
- data/test/functional/state_machine_test.rb +29 -27
- data/test/test_helper.rb +13 -1
- data/test/unit/assertions_test.rb +10 -4
- data/test/unit/branch_test.rb +65 -52
- data/test/unit/callback_test.rb +29 -29
- data/test/unit/error_test.rb +7 -5
- data/test/unit/eval_helpers_test.rb +2 -2
- data/test/unit/event_collection_test.rb +10 -10
- data/test/unit/event_test.rb +56 -55
- data/test/unit/graph_test.rb +6 -6
- data/test/unit/helper_module_test.rb +1 -1
- data/test/unit/integrations/active_model_test.rb +4 -4
- data/test/unit/integrations/active_record_test.rb +7 -7
- data/test/unit/integrations/base_test.rb +2 -2
- data/test/unit/integrations_test.rb +3 -3
- data/test/unit/invalid_event_test.rb +1 -1
- data/test/unit/invalid_parallel_transition_test.rb +1 -1
- data/test/unit/invalid_transition_test.rb +3 -3
- data/test/unit/machine_collection_test.rb +22 -18
- data/test/unit/machine_test.rb +123 -110
- data/test/unit/matcher_helpers_test.rb +3 -3
- data/test/unit/matcher_test.rb +7 -7
- data/test/unit/node_collection_test.rb +24 -22
- data/test/unit/path_collection_test.rb +17 -11
- data/test/unit/path_test.rb +16 -14
- data/test/unit/state_collection_test.rb +12 -12
- data/test/unit/state_context_test.rb +23 -21
- data/test/unit/state_enum_test.rb +1 -1
- data/test/unit/state_machine_test.rb +2 -2
- data/test/unit/state_test.rb +55 -53
- data/test/unit/transition_collection_test.rb +47 -45
- data/test/unit/transition_test.rb +53 -45
- metadata +14 -50
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
|
-
class MatcherHelpersAllTest < Test
|
3
|
+
class MatcherHelpersAllTest < MiniTest::Test
|
4
4
|
include EnumStateMachine::MatcherHelpers
|
5
5
|
|
6
6
|
def setup
|
@@ -12,7 +12,7 @@ class MatcherHelpersAllTest < Test::Unit::TestCase
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
class MatcherHelpersAnyTest < Test
|
15
|
+
class MatcherHelpersAnyTest < MiniTest::Test
|
16
16
|
include EnumStateMachine::MatcherHelpers
|
17
17
|
|
18
18
|
def setup
|
@@ -24,7 +24,7 @@ class MatcherHelpersAnyTest < Test::Unit::TestCase
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
class MatcherHelpersSameTest < Test
|
27
|
+
class MatcherHelpersSameTest < MiniTest::Test
|
28
28
|
include EnumStateMachine::MatcherHelpers
|
29
29
|
|
30
30
|
def setup
|
data/test/unit/matcher_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
|
-
class MatcherByDefaultTest < Test
|
3
|
+
class MatcherByDefaultTest < MiniTest::Test
|
4
4
|
def setup
|
5
5
|
@matcher = EnumStateMachine::Matcher.new
|
6
6
|
end
|
@@ -14,7 +14,7 @@ class MatcherByDefaultTest < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
class MatcherWithValueTest < Test
|
17
|
+
class MatcherWithValueTest < MiniTest::Test
|
18
18
|
def setup
|
19
19
|
@matcher = EnumStateMachine::Matcher.new(nil)
|
20
20
|
end
|
@@ -28,7 +28,7 @@ class MatcherWithValueTest < Test::Unit::TestCase
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
class MatcherWithMultipleValuesTest < Test
|
31
|
+
class MatcherWithMultipleValuesTest < MiniTest::Test
|
32
32
|
def setup
|
33
33
|
@matcher = EnumStateMachine::Matcher.new([:parked, :idling])
|
34
34
|
end
|
@@ -42,7 +42,7 @@ class MatcherWithMultipleValuesTest < Test::Unit::TestCase
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
class AllMatcherTest < Test
|
45
|
+
class AllMatcherTest < MiniTest::Test
|
46
46
|
def setup
|
47
47
|
@matcher = EnumStateMachine::AllMatcher.instance
|
48
48
|
end
|
@@ -70,7 +70,7 @@ class AllMatcherTest < Test::Unit::TestCase
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
class WhitelistMatcherTest < Test
|
73
|
+
class WhitelistMatcherTest < MiniTest::Test
|
74
74
|
def setup
|
75
75
|
@matcher = EnumStateMachine::WhitelistMatcher.new([:parked, :idling])
|
76
76
|
end
|
@@ -99,7 +99,7 @@ class WhitelistMatcherTest < Test::Unit::TestCase
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
-
class BlacklistMatcherTest < Test
|
102
|
+
class BlacklistMatcherTest < MiniTest::Test
|
103
103
|
def setup
|
104
104
|
@matcher = EnumStateMachine::BlacklistMatcher.new([:parked, :idling])
|
105
105
|
end
|
@@ -128,7 +128,7 @@ class BlacklistMatcherTest < Test::Unit::TestCase
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
class LoopbackMatcherTest < Test
|
131
|
+
class LoopbackMatcherTest < MiniTest::Test
|
132
132
|
def setup
|
133
133
|
@matcher = EnumStateMachine::LoopbackMatcher.instance
|
134
134
|
end
|
@@ -6,7 +6,7 @@ class Node < Struct.new(:name, :value, :machine)
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
-
class NodeCollectionByDefaultTest < Test
|
9
|
+
class NodeCollectionByDefaultTest < MiniTest::Test
|
10
10
|
def setup
|
11
11
|
@machine = EnumStateMachine::Machine.new(Class.new)
|
12
12
|
@collection = EnumStateMachine::NodeCollection.new(@machine)
|
@@ -26,29 +26,31 @@ class NodeCollectionByDefaultTest < Test::Unit::TestCase
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
class NodeCollectionTest < Test
|
29
|
+
class NodeCollectionTest < MiniTest::Test
|
30
30
|
def setup
|
31
31
|
@machine = EnumStateMachine::Machine.new(Class.new)
|
32
32
|
@collection = EnumStateMachine::NodeCollection.new(@machine)
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_should_raise_exception_if_invalid_option_specified
|
36
|
-
exception =
|
36
|
+
exception = assert_raises(ArgumentError) {
|
37
|
+
EnumStateMachine::NodeCollection.new(@machine, :invalid => true)
|
38
|
+
}
|
37
39
|
assert_equal 'Invalid key(s): invalid', exception.message
|
38
40
|
end
|
39
41
|
|
40
42
|
def test_should_raise_exception_on_lookup_if_invalid_index_specified
|
41
|
-
exception =
|
43
|
+
exception = assert_raises(ArgumentError) { @collection[:something, :invalid] }
|
42
44
|
assert_equal 'Invalid index: :invalid', exception.message
|
43
45
|
end
|
44
46
|
|
45
47
|
def test_should_raise_exception_on_fetch_if_invalid_index_specified
|
46
|
-
exception =
|
48
|
+
exception = assert_raises(ArgumentError) { @collection.fetch(:something, :invalid) }
|
47
49
|
assert_equal 'Invalid index: :invalid', exception.message
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
51
|
-
class NodeCollectionAfterBeingCopiedTest < Test
|
53
|
+
class NodeCollectionAfterBeingCopiedTest < MiniTest::Test
|
52
54
|
def setup
|
53
55
|
machine = EnumStateMachine::Machine.new(Class.new)
|
54
56
|
@collection = EnumStateMachine::NodeCollection.new(machine)
|
@@ -74,7 +76,7 @@ class NodeCollectionAfterBeingCopiedTest < Test::Unit::TestCase
|
|
74
76
|
end
|
75
77
|
|
76
78
|
def test_should_copy_each_node
|
77
|
-
|
79
|
+
refute_same @parked, @copied_collection[:parked]
|
78
80
|
end
|
79
81
|
|
80
82
|
def test_should_not_run_contexts
|
@@ -92,7 +94,7 @@ class NodeCollectionAfterBeingCopiedTest < Test::Unit::TestCase
|
|
92
94
|
end
|
93
95
|
end
|
94
96
|
|
95
|
-
class NodeCollectionWithoutIndicesTest < Test
|
97
|
+
class NodeCollectionWithoutIndicesTest < MiniTest::Test
|
96
98
|
def setup
|
97
99
|
machine = EnumStateMachine::Machine.new(Class.new)
|
98
100
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => {})
|
@@ -104,24 +106,24 @@ class NodeCollectionWithoutIndicesTest < Test::Unit::TestCase
|
|
104
106
|
end
|
105
107
|
|
106
108
|
def test_should_not_allow_keys_retrieval
|
107
|
-
exception =
|
109
|
+
exception = assert_raises(ArgumentError) { @collection.keys }
|
108
110
|
assert_equal 'No indices configured', exception.message
|
109
111
|
end
|
110
112
|
|
111
113
|
def test_should_not_allow_lookup
|
112
114
|
@collection << Object.new
|
113
|
-
exception =
|
115
|
+
exception = assert_raises(ArgumentError) { @collection[0] }
|
114
116
|
assert_equal 'No indices configured', exception.message
|
115
117
|
end
|
116
118
|
|
117
119
|
def test_should_not_allow_fetching
|
118
120
|
@collection << Object.new
|
119
|
-
exception =
|
121
|
+
exception = assert_raises(ArgumentError) { @collection.fetch(0) }
|
120
122
|
assert_equal 'No indices configured', exception.message
|
121
123
|
end
|
122
124
|
end
|
123
125
|
|
124
|
-
class NodeCollectionWithIndicesTest < Test
|
126
|
+
class NodeCollectionWithIndicesTest < MiniTest::Test
|
125
127
|
def setup
|
126
128
|
machine = EnumStateMachine::Machine.new(Class.new)
|
127
129
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => [:name, :value])
|
@@ -150,18 +152,18 @@ class NodeCollectionWithIndicesTest < Test::Unit::TestCase
|
|
150
152
|
|
151
153
|
def test_should_use_first_index_by_default_on_fetch
|
152
154
|
assert_equal @object, @collection.fetch(:parked)
|
153
|
-
exception =
|
155
|
+
exception = assert_raises(IndexError) { @collection.fetch(1) }
|
154
156
|
assert_equal '1 is an invalid name', exception.message
|
155
157
|
end
|
156
158
|
|
157
159
|
def test_should_allow_customizing_index_on_fetch
|
158
160
|
assert_equal @object, @collection.fetch(1, :value)
|
159
|
-
exception =
|
161
|
+
exception = assert_raises(IndexError) { @collection.fetch(:parked, :value) }
|
160
162
|
assert_equal ':parked is an invalid value', exception.message
|
161
163
|
end
|
162
164
|
end
|
163
165
|
|
164
|
-
class NodeCollectionWithNodesTest < Test
|
166
|
+
class NodeCollectionWithNodesTest < MiniTest::Test
|
165
167
|
def setup
|
166
168
|
@machine = EnumStateMachine::Machine.new(Class.new)
|
167
169
|
@collection = EnumStateMachine::NodeCollection.new(@machine)
|
@@ -205,7 +207,7 @@ class NodeCollectionWithNodesTest < Test::Unit::TestCase
|
|
205
207
|
end
|
206
208
|
end
|
207
209
|
|
208
|
-
class NodeCollectionAfterUpdateTest < Test
|
210
|
+
class NodeCollectionAfterUpdateTest < MiniTest::Test
|
209
211
|
def setup
|
210
212
|
machine = EnumStateMachine::Machine.new(Class.new)
|
211
213
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => [:name, :value])
|
@@ -239,7 +241,7 @@ class NodeCollectionAfterUpdateTest < Test::Unit::TestCase
|
|
239
241
|
end
|
240
242
|
end
|
241
243
|
|
242
|
-
class NodeCollectionWithStringIndexTest < Test
|
244
|
+
class NodeCollectionWithStringIndexTest < MiniTest::Test
|
243
245
|
def setup
|
244
246
|
machine = EnumStateMachine::Machine.new(Class.new)
|
245
247
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => [:name, :value])
|
@@ -257,7 +259,7 @@ class NodeCollectionWithStringIndexTest < Test::Unit::TestCase
|
|
257
259
|
end
|
258
260
|
end
|
259
261
|
|
260
|
-
class NodeCollectionWithSymbolIndexTest < Test
|
262
|
+
class NodeCollectionWithSymbolIndexTest < MiniTest::Test
|
261
263
|
def setup
|
262
264
|
machine = EnumStateMachine::Machine.new(Class.new)
|
263
265
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => [:name, :value])
|
@@ -275,7 +277,7 @@ class NodeCollectionWithSymbolIndexTest < Test::Unit::TestCase
|
|
275
277
|
end
|
276
278
|
end
|
277
279
|
|
278
|
-
class NodeCollectionWithNumericIndexTest < Test
|
280
|
+
class NodeCollectionWithNumericIndexTest < MiniTest::Test
|
279
281
|
def setup
|
280
282
|
machine = EnumStateMachine::Machine.new(Class.new)
|
281
283
|
@collection = EnumStateMachine::NodeCollection.new(machine, :index => [:name, :value])
|
@@ -297,7 +299,7 @@ class NodeCollectionWithNumericIndexTest < Test::Unit::TestCase
|
|
297
299
|
end
|
298
300
|
end
|
299
301
|
|
300
|
-
class NodeCollectionWithPredefinedContextsTest < Test
|
302
|
+
class NodeCollectionWithPredefinedContextsTest < MiniTest::Test
|
301
303
|
def setup
|
302
304
|
machine = EnumStateMachine::Machine.new(Class.new)
|
303
305
|
@collection = EnumStateMachine::NodeCollection.new(machine)
|
@@ -318,7 +320,7 @@ class NodeCollectionWithPredefinedContextsTest < Test::Unit::TestCase
|
|
318
320
|
end
|
319
321
|
end
|
320
322
|
|
321
|
-
class NodeCollectionWithPostdefinedContextsTest < Test
|
323
|
+
class NodeCollectionWithPostdefinedContextsTest < MiniTest::Test
|
322
324
|
def setup
|
323
325
|
machine = EnumStateMachine::Machine.new(Class.new)
|
324
326
|
@collection = EnumStateMachine::NodeCollection.new(machine)
|
@@ -338,7 +340,7 @@ class NodeCollectionWithPostdefinedContextsTest < Test::Unit::TestCase
|
|
338
340
|
end
|
339
341
|
end
|
340
342
|
|
341
|
-
class NodeCollectionWithMatcherContextsTest < Test
|
343
|
+
class NodeCollectionWithMatcherContextsTest < MiniTest::Test
|
342
344
|
def setup
|
343
345
|
machine = EnumStateMachine::Machine.new(Class.new)
|
344
346
|
@collection = EnumStateMachine::NodeCollection.new(machine)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
|
-
class PathCollectionByDefaultTest < Test
|
3
|
+
class PathCollectionByDefaultTest < MiniTest::Test
|
4
4
|
def setup
|
5
5
|
@klass = Class.new
|
6
6
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -45,7 +45,7 @@ class PathCollectionByDefaultTest < Test::Unit::TestCase
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
class PathCollectionTest < Test
|
48
|
+
class PathCollectionTest < MiniTest::Test
|
49
49
|
def setup
|
50
50
|
@klass = Class.new
|
51
51
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -53,22 +53,28 @@ class PathCollectionTest < Test::Unit::TestCase
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def test_should_raise_exception_if_invalid_option_specified
|
56
|
-
exception =
|
56
|
+
exception = assert_raises(ArgumentError) {
|
57
|
+
EnumStateMachine::PathCollection.new(@object, @machine, :invalid => true)
|
58
|
+
}
|
57
59
|
assert_equal 'Invalid key(s): invalid', exception.message
|
58
60
|
end
|
59
61
|
|
60
62
|
def test_should_raise_exception_if_invalid_from_state_specified
|
61
|
-
exception =
|
63
|
+
exception = assert_raises(IndexError) {
|
64
|
+
EnumStateMachine::PathCollection.new(@object, @machine, :from => :invalid)
|
65
|
+
}
|
62
66
|
assert_equal ':invalid is an invalid name', exception.message
|
63
67
|
end
|
64
68
|
|
65
69
|
def test_should_raise_exception_if_invalid_to_state_specified
|
66
|
-
exception =
|
70
|
+
exception = assert_raises(IndexError) {
|
71
|
+
EnumStateMachine::PathCollection.new(@object, @machine, :to => :invalid)
|
72
|
+
}
|
67
73
|
assert_equal ':invalid is an invalid name', exception.message
|
68
74
|
end
|
69
75
|
end
|
70
76
|
|
71
|
-
class PathCollectionWithPathsTest < Test
|
77
|
+
class PathCollectionWithPathsTest < MiniTest::Test
|
72
78
|
def setup
|
73
79
|
@klass = Class.new
|
74
80
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -114,7 +120,7 @@ class PathCollectionWithPathsTest < Test::Unit::TestCase
|
|
114
120
|
end
|
115
121
|
end
|
116
122
|
|
117
|
-
class PathWithGuardedPathsTest < Test
|
123
|
+
class PathWithGuardedPathsTest < MiniTest::Test
|
118
124
|
def setup
|
119
125
|
@klass = Class.new
|
120
126
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -139,7 +145,7 @@ class PathWithGuardedPathsTest < Test::Unit::TestCase
|
|
139
145
|
end
|
140
146
|
end
|
141
147
|
|
142
|
-
class PathCollectionWithDuplicateNodesTest < Test
|
148
|
+
class PathCollectionWithDuplicateNodesTest < MiniTest::Test
|
143
149
|
def setup
|
144
150
|
@klass = Class.new
|
145
151
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -169,7 +175,7 @@ class PathCollectionWithDuplicateNodesTest < Test::Unit::TestCase
|
|
169
175
|
end
|
170
176
|
end
|
171
177
|
|
172
|
-
class PathCollectionWithFromStateTest < Test
|
178
|
+
class PathCollectionWithFromStateTest < MiniTest::Test
|
173
179
|
def setup
|
174
180
|
@klass = Class.new
|
175
181
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -195,7 +201,7 @@ class PathCollectionWithFromStateTest < Test::Unit::TestCase
|
|
195
201
|
end
|
196
202
|
end
|
197
203
|
|
198
|
-
class PathCollectionWithToStateTest < Test
|
204
|
+
class PathCollectionWithToStateTest < MiniTest::Test
|
199
205
|
def setup
|
200
206
|
@klass = Class.new
|
201
207
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -223,7 +229,7 @@ class PathCollectionWithToStateTest < Test::Unit::TestCase
|
|
223
229
|
end
|
224
230
|
end
|
225
231
|
|
226
|
-
class PathCollectionWithDeepPathsTest < Test
|
232
|
+
class PathCollectionWithDeepPathsTest < MiniTest::Test
|
227
233
|
def setup
|
228
234
|
@klass = Class.new
|
229
235
|
@machine = EnumStateMachine::Machine.new(@klass)
|
data/test/unit/path_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
|
-
class PathByDefaultTest < Test
|
3
|
+
class PathByDefaultTest < MiniTest::Test
|
4
4
|
def setup
|
5
5
|
@klass = Class.new
|
6
6
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -52,7 +52,7 @@ class PathByDefaultTest < Test::Unit::TestCase
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
class PathTest < Test
|
55
|
+
class PathTest < MiniTest::Test
|
56
56
|
def setup
|
57
57
|
@klass = Class.new
|
58
58
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -60,12 +60,14 @@ class PathTest < Test::Unit::TestCase
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def test_should_raise_exception_if_invalid_option_specified
|
63
|
-
exception =
|
63
|
+
exception = assert_raises(ArgumentError) {
|
64
|
+
EnumStateMachine::Path.new(@object, @machine, :invalid => true)
|
65
|
+
}
|
64
66
|
assert_equal 'Invalid key(s): invalid', exception.message
|
65
67
|
end
|
66
68
|
end
|
67
69
|
|
68
|
-
class PathWithoutTransitionsTest < Test
|
70
|
+
class PathWithoutTransitionsTest < MiniTest::Test
|
69
71
|
def setup
|
70
72
|
@klass = Class.new
|
71
73
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -87,7 +89,7 @@ class PathWithoutTransitionsTest < Test::Unit::TestCase
|
|
87
89
|
end
|
88
90
|
end
|
89
91
|
|
90
|
-
class PathWithTransitionsTest < Test
|
92
|
+
class PathWithTransitionsTest < MiniTest::Test
|
91
93
|
def setup
|
92
94
|
@klass = Class.new
|
93
95
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -139,7 +141,7 @@ class PathWithTransitionsTest < Test::Unit::TestCase
|
|
139
141
|
end
|
140
142
|
end
|
141
143
|
|
142
|
-
class PathWithDuplicatesTest < Test
|
144
|
+
class PathWithDuplicatesTest < MiniTest::Test
|
143
145
|
def setup
|
144
146
|
@klass = Class.new
|
145
147
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -170,7 +172,7 @@ class PathWithDuplicatesTest < Test::Unit::TestCase
|
|
170
172
|
end
|
171
173
|
end
|
172
174
|
|
173
|
-
class PathWithAvailableTransitionsTest < Test
|
175
|
+
class PathWithAvailableTransitionsTest < MiniTest::Test
|
174
176
|
def setup
|
175
177
|
@klass = Class.new
|
176
178
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -223,7 +225,7 @@ class PathWithAvailableTransitionsTest < Test::Unit::TestCase
|
|
223
225
|
end
|
224
226
|
end
|
225
227
|
|
226
|
-
class PathWithGuardedTransitionsTest < Test
|
228
|
+
class PathWithGuardedTransitionsTest < MiniTest::Test
|
227
229
|
def setup
|
228
230
|
@klass = Class.new
|
229
231
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -264,7 +266,7 @@ class PathWithGuardedTransitionsTest < Test::Unit::TestCase
|
|
264
266
|
end
|
265
267
|
end
|
266
268
|
|
267
|
-
class PathWithEncounteredTransitionsTest < Test
|
269
|
+
class PathWithEncounteredTransitionsTest < MiniTest::Test
|
268
270
|
def setup
|
269
271
|
@klass = Class.new
|
270
272
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -297,7 +299,7 @@ class PathWithEncounteredTransitionsTest < Test::Unit::TestCase
|
|
297
299
|
end
|
298
300
|
end
|
299
301
|
|
300
|
-
class PathWithUnreachedTargetTest < Test
|
302
|
+
class PathWithUnreachedTargetTest < MiniTest::Test
|
301
303
|
def setup
|
302
304
|
@klass = Class.new
|
303
305
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -326,7 +328,7 @@ class PathWithUnreachedTargetTest < Test::Unit::TestCase
|
|
326
328
|
end
|
327
329
|
end
|
328
330
|
|
329
|
-
class PathWithReachedTargetTest < Test
|
331
|
+
class PathWithReachedTargetTest < MiniTest::Test
|
330
332
|
def setup
|
331
333
|
@klass = Class.new
|
332
334
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -359,7 +361,7 @@ class PathWithReachedTargetTest < Test::Unit::TestCase
|
|
359
361
|
end
|
360
362
|
end
|
361
363
|
|
362
|
-
class PathWithAvailableTransitionsAfterReachingTargetTest < Test
|
364
|
+
class PathWithAvailableTransitionsAfterReachingTargetTest < MiniTest::Test
|
363
365
|
def setup
|
364
366
|
@klass = Class.new
|
365
367
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -397,7 +399,7 @@ class PathWithAvailableTransitionsAfterReachingTargetTest < Test::Unit::TestCase
|
|
397
399
|
end
|
398
400
|
end
|
399
401
|
|
400
|
-
class PathWithDeepTargetTest < Test
|
402
|
+
class PathWithDeepTargetTest < MiniTest::Test
|
401
403
|
def setup
|
402
404
|
@klass = Class.new
|
403
405
|
@machine = EnumStateMachine::Machine.new(@klass)
|
@@ -436,7 +438,7 @@ class PathWithDeepTargetTest < Test::Unit::TestCase
|
|
436
438
|
end
|
437
439
|
end
|
438
440
|
|
439
|
-
class PathWithDeepTargetReachedTest < Test
|
441
|
+
class PathWithDeepTargetReachedTest < MiniTest::Test
|
440
442
|
def setup
|
441
443
|
@klass = Class.new
|
442
444
|
@machine = EnumStateMachine::Machine.new(@klass)
|