summary refs log tree commit diff
diff options
context:
space:
mode:
authorIan Dees <undees@gmail.com>2009-01-10 13:44:14 -0800
committerIan Dees <undees@gmail.com>2009-01-10 13:44:14 -0800
commit797f58c0160f7f9ad13b8d74d46a2fae40027506 (patch)
treef7ddbfe1a5b5d236272d0a8a80e7583cae100a07
parent372ab8a896a7fa227f9a472900cfe9e009030d39 (diff)
downloadbacon-797f58c0160f7f9ad13b8d74d46a2fae40027506.tar.gz
bacon-797f58c0160f7f9ad13b8d74d46a2fae40027506.tar.xz
bacon-797f58c0160f7f9ad13b8d74d46a2fae40027506.zip
Added test for nontrue values outside specs
-rw-r--r--test/spec_nontrue.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/spec_nontrue.rb b/test/spec_nontrue.rb
new file mode 100644
index 0000000..6e04e4b
--- /dev/null
+++ b/test/spec_nontrue.rb
@@ -0,0 +1,14 @@
+$false_is_not_true = false.should.not.be.true
+$nil_is_not_true = nil.should.not.be.true
+
+describe 'A non-true value' do
+  it 'should pass negated tests inside specs' do
+    false.should.not.be.true
+    nil.should.not.be.true
+  end
+  
+  it 'should pass negated tests outside specs' do
+    $false_is_not_true.should.be.true
+    $nil_is_not_true.should.be.true
+  end
+end