Skip to content

Commit

Permalink
Added a guard that gives a better error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Nov 8, 2009
1 parent cc3abba commit 3e80324
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cucumber/ast/tags.rb
Expand Up @@ -13,6 +13,7 @@ class Tags #:nodoc:

class And #:nodoc:
def initialize(tag_names)
raise "tag_names was #{tag_names.inspect} (#{tag_names.class}) - expected it to be Array" unless Array === tag_names
@negative_tags, @positive_tags = tag_names.partition{|tag_name| Tags.exclude_tag?(tag_name)}
@negative_tags = Tags.strip_negative_char(@negative_tags)
end
Expand Down

0 comments on commit 3e80324

Please sign in to comment.