Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Raise an exception if there are too many inputs.

  • Loading branch information...
commit 2dbd4276e4e96bf5086b97837643f5a74cb71511 1 parent 7239770
Paul Battley threedaymonk authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 test/graph_test.rb
12 test/graph_test.rb
@@ -37,4 +37,16 @@ def graph(source)
37 37 assert_equal "How old are you?", g.at(["yes"]).name
38 38 assert_equal "Adult", g.at(["yes", 19]).name
39 39 end
  40 +
  41 + it "should raise an exception when inputs exceed steps" do
  42 + g = graph(%{
  43 + step number a
  44 + go -> b
  45 + outcome b
  46 + })
  47 +
  48 + assert_raises Sibyl::InvalidInput do
  49 + g.at([1, 2])
  50 + end
  51 + end
40 52 end

0 comments on commit 2dbd427

Please sign in to comment.
Something went wrong with that request. Please try again.