davidlee-state-fu 0.12.0 → 0.12.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/lib/binding.rb +1 -1
- data/spec/units/binding_spec.rb +1 -1
- metadata +1 -1
data/lib/binding.rb
CHANGED
|
@@ -23,7 +23,7 @@ module StateFu
|
|
|
23
23
|
@target = object.class
|
|
24
24
|
@options = @target.state_fu_options[@method_name].merge(options)
|
|
25
25
|
end
|
|
26
|
-
@field_name = @options
|
|
26
|
+
@field_name = @options.delete(:field_name) || raise("No field_name supplied")
|
|
27
27
|
@persister = Persistence.for self
|
|
28
28
|
|
|
29
29
|
# define event methods on this binding and its @object
|
data/spec/units/binding_spec.rb
CHANGED
|
@@ -46,7 +46,7 @@ describe StateFu::Binding do
|
|
|
46
46
|
b = StateFu::Binding.new( Klass.state_fu_machine, @obj, :example,
|
|
47
47
|
:colour => :red,
|
|
48
48
|
:style => [:robust, :fruity] )
|
|
49
|
-
b.options.should == { :colour => :red, :style => [:robust, :fruity]
|
|
49
|
+
b.options.should == { :colour => :red, :style => [:robust, :fruity] }
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
describe "persister initialization" do
|