state_shifter 0.7.0 → 0.7.1
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.
- data/VERSION +1 -1
- data/lib/state_shifter/definition/class_methods.rb +1 -4
- data/spec/state_shifter_spec.rb +5 -0
- data/state_shifter.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/spec/state_shifter_spec.rb
CHANGED
@@ -20,9 +20,11 @@ shared_examples_for 'a simple state machine' do
|
|
20
20
|
|
21
21
|
@state_machine.submit
|
22
22
|
@state_machine.initial_state.should == :new
|
23
|
+
@state_machine.current_state.should == :awaiting_review
|
23
24
|
end
|
24
25
|
|
25
26
|
it 'should transit between states properly' do
|
27
|
+
@state_machine.current_state.should == :new
|
26
28
|
@state_machine.submit
|
27
29
|
@state_machine.current_state.should == :awaiting_review
|
28
30
|
|
@@ -43,6 +45,7 @@ shared_examples_for 'a simple state machine' do
|
|
43
45
|
end
|
44
46
|
|
45
47
|
it 'should respect guard statements' do
|
48
|
+
@state_machine.current_state.should == :new
|
46
49
|
@state_machine.submit
|
47
50
|
@state_machine.review
|
48
51
|
|
@@ -54,6 +57,7 @@ shared_examples_for 'a simple state machine' do
|
|
54
57
|
end
|
55
58
|
|
56
59
|
it 'should know if a transition is possible' do
|
60
|
+
@state_machine.current_state.should == :new
|
57
61
|
@state_machine.can_submit?.should be_true
|
58
62
|
|
59
63
|
@state_machine.submit
|
@@ -67,6 +71,7 @@ shared_examples_for 'a simple state machine' do
|
|
67
71
|
end
|
68
72
|
|
69
73
|
it 'should properly indicate next states' do
|
74
|
+
@state_machine.current_state.should == :new
|
70
75
|
@state_machine.next_states.should == [:awaiting_review]
|
71
76
|
@state_machine.transitionable_states.should == [:awaiting_review]
|
72
77
|
|
data/state_shifter.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: state_shifter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
segments:
|
174
174
|
- 0
|
175
|
-
hash:
|
175
|
+
hash: -1507395421623075771
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
none: false
|
178
178
|
requirements:
|