summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 02:00:03 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 02:00:03 +0100
commit22d47a530ef4932afb254d01cc44fbaac12c3d71 (patch)
tree4553f25e61c9bac263c5b30b0c82712808d5c559
parentb0602a7143ca94a6639724fcebb3e4e4ecc29fdb (diff)
downloadbacon-22d47a530ef4932afb254d01cc44fbaac12c3d71.tar.gz
bacon-22d47a530ef4932afb254d01cc44fbaac12c3d71.tar.xz
bacon-22d47a530ef4932afb254d01cc44fbaac12c3d71.zip
Refactor tests
darcs-hash:20071205010003-4fc50-b80669ebc8e959181962e33a9bef1c8d9edec719.gz
-rw-r--r--test/spec_bacon.rb21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb
index 2038e8a..4760331 100644
--- a/test/spec_bacon.rb
+++ b/test/spec_bacon.rb
@@ -135,6 +135,13 @@ describe "Bacon" do
     lambda { lambda { raise "Error" }.should.not.raise }.should fail
   end
 
+  it "should have should.throw" do
+    lambda { lambda { throw :foo }.should.throw(:foo) }.should succeed
+    lambda { lambda {       :foo }.should.throw(:foo) }.should fail
+
+    should.throw(:foo) { throw :foo }
+  end
+
   it "should have should.not.satisfy" do
     lambda { should.not.satisfy { 1 == 2 } }.should succeed
     lambda { should.not.satisfy { 1 == 1 } }.should fail
@@ -196,20 +203,6 @@ describe "Bacon" do
     lambda { nil.should.not.bla }.should.raise(NoMethodError)
   end
 
-  it "should have should.raise" do
-    lambda { lambda { bla }.should.raise(NameError) }.should succeed
-    lambda { lambda { nil }.should.raise(NameError) }.should fail
-
-    should.raise(NameError) { bla }
-  end
-
-  it "should have should.throw" do
-    lambda { lambda { throw :foo }.should.throw(:foo) }.should succeed
-    lambda { lambda {       :foo }.should.throw(:foo) }.should fail
-
-    should.throw(:foo) { throw :foo }
-  end
-
   it "should have should <operator> (>, >=, <, <=, ===)" do
     lambda { 2.should.be > 1 }.should succeed
     lambda { 1.should.be > 2 }.should fail