finite_machine 0.10.2 → 0.11.0

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/Gemfile +1 -1
  4. data/README.md +73 -35
  5. data/assets/finite_machine_logo.png +0 -0
  6. data/lib/finite_machine.rb +0 -7
  7. data/lib/finite_machine/async_proxy.rb +1 -2
  8. data/lib/finite_machine/dsl.rb +13 -14
  9. data/lib/finite_machine/event_definition.rb +32 -35
  10. data/lib/finite_machine/events_chain.rb +183 -37
  11. data/lib/finite_machine/hook_event.rb +47 -42
  12. data/lib/finite_machine/logger.rb +3 -4
  13. data/lib/finite_machine/observer.rb +27 -11
  14. data/lib/finite_machine/state_definition.rb +66 -0
  15. data/lib/finite_machine/state_machine.rb +177 -99
  16. data/lib/finite_machine/subscribers.rb +17 -6
  17. data/lib/finite_machine/thread_context.rb +1 -1
  18. data/lib/finite_machine/transition.rb +45 -173
  19. data/lib/finite_machine/transition_builder.rb +24 -6
  20. data/lib/finite_machine/transition_event.rb +5 -4
  21. data/lib/finite_machine/undefined_transition.rb +32 -0
  22. data/lib/finite_machine/version.rb +1 -1
  23. data/spec/spec_helper.rb +1 -0
  24. data/spec/unit/async_events_spec.rb +24 -18
  25. data/spec/unit/callbacks_spec.rb +0 -19
  26. data/spec/unit/event_names_spec.rb +19 -0
  27. data/spec/unit/events_chain/add_spec.rb +25 -0
  28. data/spec/unit/events_chain/cancel_transitions_spec.rb +22 -0
  29. data/spec/unit/events_chain/choice_transition_spec.rb +28 -0
  30. data/spec/unit/events_chain/clear_spec.rb +7 -18
  31. data/spec/unit/events_chain/events_spec.rb +18 -0
  32. data/spec/unit/events_chain/inspect_spec.rb +14 -17
  33. data/spec/unit/events_chain/match_transition_spec.rb +37 -0
  34. data/spec/unit/events_chain/move_to_spec.rb +48 -0
  35. data/spec/unit/events_chain/states_for_spec.rb +17 -0
  36. data/spec/unit/events_spec.rb +119 -27
  37. data/spec/unit/hook_event/build_spec.rb +15 -0
  38. data/spec/unit/hook_event/eql_spec.rb +3 -4
  39. data/spec/unit/hook_event/initialize_spec.rb +14 -11
  40. data/spec/unit/hook_event/notify_spec.rb +14 -0
  41. data/spec/unit/{initialize_spec.rb → initial_spec.rb} +1 -1
  42. data/spec/unit/inspect_spec.rb +1 -1
  43. data/spec/unit/logger_spec.rb +4 -5
  44. data/spec/unit/subscribers_spec.rb +20 -9
  45. data/spec/unit/transition/check_conditions_spec.rb +54 -0
  46. data/spec/unit/transition/inspect_spec.rb +2 -2
  47. data/spec/unit/transition/matches_spec.rb +23 -0
  48. data/spec/unit/transition/states_spec.rb +31 -0
  49. data/spec/unit/transition/to_state_spec.rb +27 -0
  50. data/spec/unit/trigger_spec.rb +22 -0
  51. data/spec/unit/undefined_transition/eql_spec.rb +17 -0
  52. data/tasks/console.rake +1 -0
  53. metadata +39 -23
  54. data/lib/finite_machine/event.rb +0 -146
  55. data/spec/unit/event/add_spec.rb +0 -16
  56. data/spec/unit/event/eql_spec.rb +0 -37
  57. data/spec/unit/event/initialize_spec.rb +0 -38
  58. data/spec/unit/event/inspect_spec.rb +0 -21
  59. data/spec/unit/event/next_transition_spec.rb +0 -35
  60. data/spec/unit/events_chain/check_choice_conditions_spec.rb +0 -20
  61. data/spec/unit/events_chain/insert_spec.rb +0 -26
  62. data/spec/unit/events_chain/select_transition_spec.rb +0 -23
  63. data/spec/unit/transition/parse_states_spec.rb +0 -42
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::HookEvent, '#build' do
6
+ it "builds action event" do
7
+ hook_event = FiniteMachine::HookEvent::Before.build(:green, :go, :red)
8
+ expect(hook_event.name).to eq(:go)
9
+ end
10
+
11
+ it "builds state event" do
12
+ hook_event = FiniteMachine::HookEvent::Enter.build(:green, :go, :red)
13
+ expect(hook_event.name).to eq(:green)
14
+ end
15
+ end
@@ -4,11 +4,10 @@ require 'spec_helper'
4
4
 
5
5
  RSpec.describe FiniteMachine::HookEvent, 'eql?' do
6
6
  let(:name) { :green }
7
- let(:transition) { double(:transition) }
8
- let(:data) { [:foo, :bar] }
7
+ let(:event_name) { :go }
9
8
  let(:object) { described_class }
10
9
 
11
- subject(:hook) { object.new(name, transition, *data) }
10
+ subject(:hook) { object.new(name, event_name, name) }
12
11
 
13
12
  context 'with the same object' do
14
13
  let(:other) { hook }
@@ -28,7 +27,7 @@ RSpec.describe FiniteMachine::HookEvent, 'eql?' do
28
27
 
29
28
  context "with an object having different name" do
30
29
  let(:other_name) { :red }
31
- let(:other) { object.new(other_name, transition, *data) }
30
+ let(:other) { object.new(other_name, event_name, other_name) }
32
31
 
33
32
  it "doesn't equal" do
34
33
  expect(hook).not_to eql(other)
@@ -2,21 +2,24 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- RSpec.describe FiniteMachine::HookEvent, 'new' do
6
- let(:name) { :green }
7
- let(:transition) { double(:transition) }
8
- let(:data) { [:foo, :bar] }
9
- let(:object) { described_class }
5
+ RSpec.describe FiniteMachine::HookEvent, '#new' do
6
+ it "reads event name" do
7
+ hook_event = described_class.new(:green, :go, :green)
8
+ expect(hook_event.name).to eql(:green)
9
+ end
10
10
 
11
- subject(:hook) { object.new(name, transition, *data) }
11
+ it "reads event type" do
12
+ hook_event = described_class.new(:green, :go, :green)
13
+ expect(hook_event.type).to eql(FiniteMachine::HookEvent)
14
+ end
12
15
 
13
- it "exposes readers" do
14
- expect(hook.name).to eql(name)
15
- expect(hook.data).to eql(data)
16
- expect(hook.type).to eql(object)
16
+ it "reads the from state" do
17
+ hook_event = described_class.new(:green, :go, :red)
18
+ expect(hook_event.from).to eql(:red)
17
19
  end
18
20
 
19
21
  it "freezes object" do
20
- expect { hook.name = :red }.to raise_error(RuntimeError)
22
+ hook_event = described_class.new(:green, :go, :green)
23
+ expect { hook_event.name = :red }.to raise_error(RuntimeError)
21
24
  end
22
25
  end
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::HookEvent, '.notify' do
6
+ it "emits event on the subscriber" do
7
+ subscriber = spy(:subscriber)
8
+ hook_event = described_class.new(:green, :go, :red)
9
+
10
+ hook_event.notify(subscriber, 1, 2)
11
+
12
+ expect(subscriber).to have_received(:emit).with(hook_event, 1, 2)
13
+ end
14
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- RSpec.describe FiniteMachine, 'initialize' do
5
+ RSpec.describe FiniteMachine, 'initial' do
6
6
 
7
7
  before(:each) {
8
8
  stub_const("DummyLogger", Class.new do
@@ -12,6 +12,6 @@ RSpec.describe FiniteMachine, '#inspect' do
12
12
  event :stop, :yellow => :red
13
13
  }
14
14
  end
15
- expect(fsm.inspect).to match(/^<#FiniteMachine::StateMachine:0x#{fsm.object_id.to_s(16)} @states=\[:none, :green, :yellow, :red\], @events=\[:init, :slow, :stop\], @transitions=.*$/)
15
+ expect(fsm.inspect).to match(/^<#FiniteMachine::StateMachine:0x#{fsm.object_id.to_s(16)} @states=\[:none, :green, :yellow, :red\], @events=\[:init, :slow, :stop\], @transitions=\[{:none=>:green}, {:green=>:yellow}, {:yellow=>:red}\]>$/)
16
16
  end
17
17
  end
@@ -4,7 +4,7 @@ require 'spec_helper'
4
4
 
5
5
  RSpec.describe FiniteMachine::Logger do
6
6
  let(:message) { 'error' }
7
- let(:log) { double }
7
+ let(:log) { spy }
8
8
 
9
9
  subject(:logger) { described_class }
10
10
 
@@ -31,9 +31,8 @@ RSpec.describe FiniteMachine::Logger do
31
31
  end
32
32
 
33
33
  it "reports transition" do
34
- expect(log).to receive(:info).with("Transition: @event=go red -> green")
35
- machine = double(:machine, current: :green)
36
- transition = double(:transition, name: "go", from_state: :red, machine: machine)
37
- logger.report_transition(transition)
34
+ logger.report_transition(:go, :red, :green)
35
+
36
+ expect(log).to have_received(:info).with("Transition: @event=go red -> green")
38
37
  end
39
38
  end
@@ -3,29 +3,40 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  RSpec.describe FiniteMachine::Subscribers do
6
- let(:machine) { double }
7
- let(:event) { double }
8
6
  let(:listener) { double }
9
7
 
10
- subject(:subscribers) { described_class.new(machine) }
11
-
12
- before { subscribers.subscribe(listener) }
13
-
14
8
  it "checks if any subscribers exist" do
15
- expect(subscribers.empty?).to be(false)
9
+ subscribers = described_class.new
10
+ expect(subscribers.empty?).to eq(true)
11
+ subscribers.subscribe(listener)
12
+ expect(subscribers.empty?).to eq(false)
13
+ end
14
+
15
+ it "allows to subscribe multiple listeners" do
16
+ subscribers = described_class.new
17
+ subscribers.subscribe(listener, listener)
18
+ expect(subscribers.size).to eq(2)
16
19
  end
17
20
 
18
21
  it "returns index for the subscriber" do
22
+ subscribers = described_class.new
23
+ subscribers.subscribe(listener)
19
24
  expect(subscribers.index(listener)).to eql(0)
20
25
  end
21
26
 
22
27
  it "visits all subscribed listeners for the event" do
23
- expect(event).to receive(:notify).with(listener)
28
+ subscribers = described_class.new
29
+ subscribers.subscribe(listener)
30
+ event = spy(:event)
24
31
  subscribers.visit(event)
32
+ expect(event).to have_received(:notify).with(listener)
25
33
  end
26
34
 
27
35
  it "resets the subscribers" do
36
+ subscribers = described_class.new
37
+ subscribers.subscribe(listener)
38
+ expect(subscribers.empty?).to eq(false)
28
39
  subscribers.reset
29
- expect(subscribers.empty?).to be(true)
40
+ expect(subscribers.empty?).to eq(true)
30
41
  end
31
42
  end
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::Transition, '.check_conditions' do
6
+ it "verifies all conditions pass" do
7
+ exec_conditions = 0
8
+ ok_condition = -> { exec_conditions += 1; return true }
9
+ fail_condition = -> { exec_conditions += 1; return false }
10
+ machine = double(:machine, target: Object.new)
11
+
12
+ transition = described_class.new(machine, if: [ok_condition, fail_condition])
13
+
14
+ expect(transition.check_conditions).to eql(false)
15
+ expect(exec_conditions).to eq(2)
16
+ end
17
+
18
+ it "verifies 'if' and 'unless' conditions" do
19
+ machine = double(:machine, target: Object.new)
20
+ exec_conditions = 0
21
+ ok_condition = -> { exec_conditions += 1; return true }
22
+ fail_condition = -> { exec_conditions += 1; return false }
23
+
24
+ transition = described_class.new(machine, if: [ok_condition], unless: [fail_condition])
25
+
26
+ expect(transition.check_conditions).to eql(true)
27
+ expect(exec_conditions).to eq(2)
28
+ end
29
+
30
+ it "verifies condition with arguments" do
31
+ machine = double(:machine, target: Object.new)
32
+ condition = lambda { |target, arg| arg == 1 }
33
+
34
+ transition = described_class.new(machine, if: [condition])
35
+
36
+ expect(transition.check_conditions(2)).to eql(false)
37
+ expect(transition.check_conditions(1)).to eql(true)
38
+ end
39
+
40
+ it "verifies condition on target" do
41
+ stub_const("Car", Class.new do
42
+ def engine_on?
43
+ true
44
+ end
45
+ end)
46
+ target = Car.new
47
+ machine = double(:machine, target: target)
48
+ condition = lambda { |car| car.engine_on? }
49
+
50
+ transition = described_class.new(machine, if: condition)
51
+
52
+ expect(transition.check_conditions).to eql(true)
53
+ end
54
+ end
@@ -8,7 +8,7 @@ RSpec.describe FiniteMachine::Transition, '#inspect' do
8
8
  subject(:transition) { described_class.new(machine, attrs) }
9
9
 
10
10
  context 'when inspecting' do
11
- let(:attrs) { {name: :start, parsed_states: { :foo => :bar, :baz => :daz } } }
11
+ let(:attrs) { {name: :start, states: { :foo => :bar, :baz => :daz } } }
12
12
 
13
13
  it "displays name and transitions" do
14
14
  expect(transition.inspect).to eql("<#FiniteMachine::Transition @name=start, @transitions=foo -> bar, baz -> daz, @when=[]>")
@@ -16,7 +16,7 @@ RSpec.describe FiniteMachine::Transition, '#inspect' do
16
16
  end
17
17
 
18
18
  context 'when converting to string' do
19
- let(:attrs) { {name: :start, parsed_states: { :foo => :bar } } }
19
+ let(:attrs) { {name: :start, states: { :foo => :bar } } }
20
20
 
21
21
  it "displays name and transitions" do
22
22
  expect(transition.to_s).to eql("start")
@@ -0,0 +1,23 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::Transition, '.matches?' do
6
+ let(:machine) { double(:machine) }
7
+
8
+ it "matches from state" do
9
+ states = {:green => :red}
10
+ transition = described_class.new(machine, states: states)
11
+
12
+ expect(transition.matches?(:green)).to eq(true)
13
+ expect(transition.matches?(:red)).to eq(false)
14
+ end
15
+
16
+ it "matches any state" do
17
+ states = {:any => :red}
18
+ transition = described_class.new(machine, states: states)
19
+
20
+ expect(transition.matches?(:green)).to eq(true)
21
+ end
22
+ end
23
+
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::Transition, '.states' do
6
+ let(:machine) { double(:machine) }
7
+
8
+ it "groups states with :to key only" do
9
+ attrs = {states: {:any => :red}}
10
+ transition = FiniteMachine::Transition.new(machine, attrs)
11
+ expect(transition.states).to eql({any: :red})
12
+ end
13
+
14
+ it "groups states when from array" do
15
+ attrs = {states: { :green => :red, :yellow => :red}}
16
+ transition = FiniteMachine::Transition.new(machine, attrs)
17
+ expect(transition.states.keys).to match_array([:green, :yellow])
18
+ expect(transition.states.values).to eql([:red, :red])
19
+ end
20
+
21
+
22
+ it "groups states when hash of states" do
23
+ attrs = {states: {
24
+ :initial => :low,
25
+ :low => :medium,
26
+ :medium => :high }}
27
+ transition = FiniteMachine::Transition.new(machine, attrs)
28
+ expect(transition.states.keys).to match_array([:initial, :low, :medium])
29
+ expect(transition.states.values).to eql([:low, :medium, :high])
30
+ end
31
+ end
@@ -0,0 +1,27 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::Transition, '.to_state' do
6
+ let(:machine) { double(:machine) }
7
+
8
+ it "finds to state" do
9
+ states = {:green => :red}
10
+ transition = described_class.new(machine, states: states)
11
+
12
+ expect(transition.to_state(:green)).to eq(:red)
13
+ end
14
+
15
+ it "finds to state for transition from any state" do
16
+ states = {:any => :red}
17
+ transition = described_class.new(machine, states: states)
18
+
19
+ expect(transition.to_state(:green)).to eq(:red)
20
+ end
21
+
22
+ it "returns from state for cancelled transition" do
23
+ transition = described_class.new(machine, cancelled: true)
24
+
25
+ expect(transition.to_state(:green)).to eq(:green)
26
+ end
27
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::StateMachine, '.trigger' do
6
+ it "triggers event manually" do
7
+ called = []
8
+ fsm = FiniteMachine.define do
9
+ initial :red
10
+
11
+ events {
12
+ event :start, :red => :green, if: proc { |_, name| called << name; true }
13
+ event :stop, :green => :red
14
+ }
15
+ end
16
+
17
+ expect(fsm.current).to eq(:red)
18
+ fsm.trigger(:start, 'Piotr')
19
+ expect(fsm.current).to eq(:green)
20
+ expect(called).to eq(['Piotr'])
21
+ end
22
+ end
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe FiniteMachine::UndefinedTransition, '#==' do
6
+ it "is true with the same name" do
7
+ expect(described_class.new(:go)).to eq(described_class.new(:go))
8
+ end
9
+
10
+ it "is false with a different name" do
11
+ expect(described_class.new(:go)).to_not eq(described_class.new(:other))
12
+ end
13
+
14
+ it "is false with another object" do
15
+ expect(described_class.new(:go)).to_not eq(:other)
16
+ end
17
+ end
data/tasks/console.rake CHANGED
@@ -8,3 +8,4 @@ task :console do
8
8
  ARGV.clear
9
9
  IRB.start
10
10
  end
11
+ task :c => :console
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finite_machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-05 00:00:00.000000000 Z
11
+ date: 2015-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -43,6 +43,7 @@ files:
43
43
  - LICENSE.txt
44
44
  - README.md
45
45
  - Rakefile
46
+ - assets/finite_machine_logo.png
46
47
  - examples/atm.rb
47
48
  - examples/bug_system.rb
48
49
  - finite_machine.gemspec
@@ -55,7 +56,6 @@ files:
55
56
  - lib/finite_machine/definition.rb
56
57
  - lib/finite_machine/dsl.rb
57
58
  - lib/finite_machine/env.rb
58
- - lib/finite_machine/event.rb
59
59
  - lib/finite_machine/event_definition.rb
60
60
  - lib/finite_machine/event_queue.rb
61
61
  - lib/finite_machine/events_chain.rb
@@ -65,6 +65,7 @@ files:
65
65
  - lib/finite_machine/logger.rb
66
66
  - lib/finite_machine/observer.rb
67
67
  - lib/finite_machine/safety.rb
68
+ - lib/finite_machine/state_definition.rb
68
69
  - lib/finite_machine/state_machine.rb
69
70
  - lib/finite_machine/state_parser.rb
70
71
  - lib/finite_machine/subscribers.rb
@@ -74,6 +75,7 @@ files:
74
75
  - lib/finite_machine/transition_builder.rb
75
76
  - lib/finite_machine/transition_event.rb
76
77
  - lib/finite_machine/two_phase_lock.rb
78
+ - lib/finite_machine/undefined_transition.rb
77
79
  - lib/finite_machine/version.rb
78
80
  - spec/spec_helper.rb
79
81
  - spec/unit/alias_target_spec.rb
@@ -84,26 +86,28 @@ files:
84
86
  - spec/unit/choice_spec.rb
85
87
  - spec/unit/define_spec.rb
86
88
  - spec/unit/definition_spec.rb
87
- - spec/unit/event/add_spec.rb
88
- - spec/unit/event/eql_spec.rb
89
- - spec/unit/event/initialize_spec.rb
90
- - spec/unit/event/inspect_spec.rb
91
- - spec/unit/event/next_transition_spec.rb
89
+ - spec/unit/event_names_spec.rb
92
90
  - spec/unit/event_queue_spec.rb
93
- - spec/unit/events_chain/check_choice_conditions_spec.rb
91
+ - spec/unit/events_chain/add_spec.rb
92
+ - spec/unit/events_chain/cancel_transitions_spec.rb
93
+ - spec/unit/events_chain/choice_transition_spec.rb
94
94
  - spec/unit/events_chain/clear_spec.rb
95
- - spec/unit/events_chain/insert_spec.rb
95
+ - spec/unit/events_chain/events_spec.rb
96
96
  - spec/unit/events_chain/inspect_spec.rb
97
- - spec/unit/events_chain/select_transition_spec.rb
97
+ - spec/unit/events_chain/match_transition_spec.rb
98
+ - spec/unit/events_chain/move_to_spec.rb
99
+ - spec/unit/events_chain/states_for_spec.rb
98
100
  - spec/unit/events_spec.rb
99
101
  - spec/unit/handlers_spec.rb
102
+ - spec/unit/hook_event/build_spec.rb
100
103
  - spec/unit/hook_event/eql_spec.rb
101
104
  - spec/unit/hook_event/initialize_spec.rb
105
+ - spec/unit/hook_event/notify_spec.rb
102
106
  - spec/unit/hooks/call_spec.rb
103
107
  - spec/unit/hooks/inspect_spec.rb
104
108
  - spec/unit/hooks/register_spec.rb
105
109
  - spec/unit/if_unless_spec.rb
106
- - spec/unit/initialize_spec.rb
110
+ - spec/unit/initial_spec.rb
107
111
  - spec/unit/inspect_spec.rb
108
112
  - spec/unit/is_spec.rb
109
113
  - spec/unit/log_transitions_spec.rb
@@ -115,8 +119,13 @@ files:
115
119
  - spec/unit/subscribers_spec.rb
116
120
  - spec/unit/target_spec.rb
117
121
  - spec/unit/terminated_spec.rb
122
+ - spec/unit/transition/check_conditions_spec.rb
118
123
  - spec/unit/transition/inspect_spec.rb
119
- - spec/unit/transition/parse_states_spec.rb
124
+ - spec/unit/transition/matches_spec.rb
125
+ - spec/unit/transition/states_spec.rb
126
+ - spec/unit/transition/to_state_spec.rb
127
+ - spec/unit/trigger_spec.rb
128
+ - spec/unit/undefined_transition/eql_spec.rb
120
129
  - tasks/console.rake
121
130
  - tasks/coverage.rake
122
131
  - tasks/spec.rake
@@ -154,26 +163,28 @@ test_files:
154
163
  - spec/unit/choice_spec.rb
155
164
  - spec/unit/define_spec.rb
156
165
  - spec/unit/definition_spec.rb
157
- - spec/unit/event/add_spec.rb
158
- - spec/unit/event/eql_spec.rb
159
- - spec/unit/event/initialize_spec.rb
160
- - spec/unit/event/inspect_spec.rb
161
- - spec/unit/event/next_transition_spec.rb
166
+ - spec/unit/event_names_spec.rb
162
167
  - spec/unit/event_queue_spec.rb
163
- - spec/unit/events_chain/check_choice_conditions_spec.rb
168
+ - spec/unit/events_chain/add_spec.rb
169
+ - spec/unit/events_chain/cancel_transitions_spec.rb
170
+ - spec/unit/events_chain/choice_transition_spec.rb
164
171
  - spec/unit/events_chain/clear_spec.rb
165
- - spec/unit/events_chain/insert_spec.rb
172
+ - spec/unit/events_chain/events_spec.rb
166
173
  - spec/unit/events_chain/inspect_spec.rb
167
- - spec/unit/events_chain/select_transition_spec.rb
174
+ - spec/unit/events_chain/match_transition_spec.rb
175
+ - spec/unit/events_chain/move_to_spec.rb
176
+ - spec/unit/events_chain/states_for_spec.rb
168
177
  - spec/unit/events_spec.rb
169
178
  - spec/unit/handlers_spec.rb
179
+ - spec/unit/hook_event/build_spec.rb
170
180
  - spec/unit/hook_event/eql_spec.rb
171
181
  - spec/unit/hook_event/initialize_spec.rb
182
+ - spec/unit/hook_event/notify_spec.rb
172
183
  - spec/unit/hooks/call_spec.rb
173
184
  - spec/unit/hooks/inspect_spec.rb
174
185
  - spec/unit/hooks/register_spec.rb
175
186
  - spec/unit/if_unless_spec.rb
176
- - spec/unit/initialize_spec.rb
187
+ - spec/unit/initial_spec.rb
177
188
  - spec/unit/inspect_spec.rb
178
189
  - spec/unit/is_spec.rb
179
190
  - spec/unit/log_transitions_spec.rb
@@ -185,6 +196,11 @@ test_files:
185
196
  - spec/unit/subscribers_spec.rb
186
197
  - spec/unit/target_spec.rb
187
198
  - spec/unit/terminated_spec.rb
199
+ - spec/unit/transition/check_conditions_spec.rb
188
200
  - spec/unit/transition/inspect_spec.rb
189
- - spec/unit/transition/parse_states_spec.rb
201
+ - spec/unit/transition/matches_spec.rb
202
+ - spec/unit/transition/states_spec.rb
203
+ - spec/unit/transition/to_state_spec.rb
204
+ - spec/unit/trigger_spec.rb
205
+ - spec/unit/undefined_transition/eql_spec.rb
190
206
  has_rdoc: