summary refs log tree commit diff
diff options
context:
space:
mode:
-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