diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2009-01-10 14:01:30 -0800 |
---|---|---|
committer | Ian Dees <undees@gmail.com> | 2009-01-10 14:01:30 -0800 |
commit | b3e392c7830959557c098ac1b5ca85a0853f596d (patch) | |
tree | b2e4a31acd9023910ee60b22df73b540c5bf8e4b | |
parent | 797f58c0160f7f9ad13b8d74d46a2fae40027506 (diff) | |
download | bacon-b3e392c7830959557c098ac1b5ca85a0853f596d.tar.gz bacon-b3e392c7830959557c098ac1b5ca85a0853f596d.tar.xz bacon-b3e392c7830959557c098ac1b5ca85a0853f596d.zip |
Allow negated nontrue values outside specs
-rw-r--r-- | lib/bacon.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bacon.rb b/lib/bacon.rb index f034fc7..3b71fd1 100644 --- a/lib/bacon.rb +++ b/lib/bacon.rb @@ -329,8 +329,10 @@ class Should if Bacon::Counter[:depth] > 0 Bacon::Counter[:requirements] += 1 raise Bacon::Error.new(:failed, description) unless @negated ^ r + r + else + @negated ? !r : !!r end - @negated ^ r ? r : false end def method_missing(name, *args, &block) |