diff options
| author | Luke Kanies <luke@madstop.com> | 2008-08-18 21:51:27 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-08-20 12:13:25 -0500 |
| commit | 78bc32d0153dd98fadae99dcd71d26fc97210d3c (patch) | |
| tree | 72fdd0d5ff938534e65a63bd83839df2ac1f6ddf /spec/unit/util | |
| parent | a5ab52c628cae7ac9ed5ca1bd5de779944840802 (diff) | |
Removing dead-end file work as promised.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/state_machine.rb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/unit/util/state_machine.rb b/spec/unit/util/state_machine.rb deleted file mode 100755 index e8ffc629d..000000000 --- a/spec/unit/util/state_machine.rb +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env ruby - -require File.dirname(__FILE__) + '/../../spec_helper' - -require 'puppet/util/state_machine' - -describe Puppet::Util::StateMachine do - before do - @class = Puppet::Util::StateMachine - @machine = @class.new - end - - it "should instance_eval any provided block" do - f = @class.new { state(:foo, "foo") } - f.should be_state(:foo) - end - - it "should be able to declare states" do - @machine.should respond_to(:state) - end - - it "should require documentation when declaring states" do - lambda { @machine.state(:foo) }.should raise_error(ArgumentError) - end - - it "should be able to detect when states are set" do - @machine.state(:foo, "bar") - @machine.should be_state(:foo) - end - - it "should be able to declare transitions" do - @machine.should respond_to(:transition) - end - - describe "when adding transitions" do - it "should fail if the starting state of a transition is unknown" do - @machine.state(:end, "foo") - lambda { @machine.transition(:start, :end) }.should raise_error(ArgumentError) - end - - it "should fail if the ending state of a transition is unknown" do - @machine.state(:start, "foo") - lambda { @machine.transition(:start, :end) }.should raise_error(ArgumentError) - end - - it "should fail if an equivalent transition already exists" do - @machine.state(:start, "foo") - @machine.state(:end, "foo") - @machine.transition(:start, :end) - lambda { @machine.transition(:start, :end) }.should raise_error(ArgumentError) - end - end - - describe "when making a transition" do - it "should require the initial state" - - it "should return all of the transitions to be made" - end -end |
