Permalink
Browse files

Be consistent: multiple.

  • Loading branch information...
threedaymonk committed Mar 22, 2012
1 parent 4023e05 commit 21fee8ca1089eebe1b5c59a8884be3b8737d38b5
Showing with 8 additions and 8 deletions.
  1. +4 −4 lib/sibyl/unit.rb
  2. +4 −4 test/graph_validation_test.rb
View
@@ -96,11 +96,11 @@ def l10n_keys
end
def validate!
- if type.to_s == "option"
- raise InvalidNode, "option step '#{name}' has no options" if options.none?
- raise InvalidNode, "option step '#{name}' has non-option branches" if (branches - options).any?
+ if type.to_s == "multiple"
+ raise InvalidNode, "multiple step '#{name}' has no options" if options.none?
+ raise InvalidNode, "multiple step '#{name}' has non-option branches" if (branches - options).any?
else
- raise InvalidNode, "non-option step '#{name}' has options" if options.any?
+ raise InvalidNode, "non-multiple step '#{name}' has options" if options.any?
raise InvalidNode, "step '#{name}' has no outputs" if branches.none?
end
end
@@ -32,7 +32,7 @@ def graph(source)
it "should be invalid if a target is unresolved" do
g = graph(%{
- step option a
+ step multiple a
option foo -> b
option bar -> c
outcome b
@@ -53,7 +53,7 @@ def graph(source)
it "should be invalid if there are cycles" do
g = graph(%{
- step option a
+ step multiple a
option foo -> b
option bar -> c
step number b
@@ -70,7 +70,7 @@ def graph(source)
g = graph(%{
step number a
go -> c
- step option b
+ step multiple b
outcome c
})
@@ -81,7 +81,7 @@ def graph(source)
it "should be invalid if a multiple step has a go" do
g = graph(%{
- step option a
+ step multiple a
option foo -> b
go -> c
outcome b

0 comments on commit 21fee8c

Please sign in to comment.