Blob Blame History Raw
From a454ecb17cd1058ad46665824ca4d0f309f0eccf Mon Sep 17 00:00:00 2001
From: Joshua Peek <josh@joshpeek.com>
Date: Tue, 20 Aug 2013 18:26:59 -0500
Subject: [PATCH] assert_raise -> assert_raises

---
 test/test_asset.rb            | 30 +++++++++++++++---------------
 test/test_asset_attributes.rb |  2 +-
 test/test_encoding.rb         |  2 +-
 test/test_environment.rb      |  2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/test/test_asset.rb b/test/test_asset.rb
index 0a6a118..7346620 100644
--- a/test/test_asset.rb
+++ b/test/test_asset.rb
@@ -619,7 +619,7 @@ def setup
   end
 
   test "requiring a file of a different format raises an exception" do
-    assert_raise Sprockets::ContentTypeMismatch do
+    assert_raises Sprockets::ContentTypeMismatch do
       asset("mismatch.js")
     end
   end
@@ -696,13 +696,13 @@ def setup
   end
 
   test "can't require files outside the load path" do
-    assert_raise Sprockets::FileNotFound do
+    assert_raises Sprockets::FileNotFound do
       asset("relative/require_outside_path.js")
     end
   end
 
   test "can't require absolute files outside the load path" do
-    assert_raise Sprockets::FileOutsidePaths do
+    assert_raises Sprockets::FileOutsidePaths do
       asset("absolute/require_outside_path.js").to_s
     end
   end
@@ -743,19 +743,19 @@ def setup
   end
 
   test "require_tree with a logical path argument raises an exception" do
-    assert_raise(Sprockets::ArgumentError) do
+    assert_raises(Sprockets::ArgumentError) do
       asset("tree/with_logical_path/require_tree_with_logical_path.js").to_s
     end
   end
 
   test "require_tree with a nonexistent path raises an exception" do
-    assert_raise(Sprockets::ArgumentError) do
+    assert_raises(Sprockets::ArgumentError) do
       asset("tree/with_logical_path/require_tree_with_nonexistent_path.js").to_s
     end
   end
 
   test "require_tree with a nonexistent absolute path raises an exception" do
-    assert_raise(Sprockets::ArgumentError) do
+    assert_raises(Sprockets::ArgumentError) do
       asset("absolute/require_nonexistent_path.js").to_s
     end
   end
@@ -772,7 +772,7 @@ def setup
   end
 
   test "multiple require_self directives raises and error" do
-    assert_raise(Sprockets::ArgumentError) do
+    assert_raises(Sprockets::ArgumentError) do
       asset("require_self_twice.css")
     end
   end
@@ -786,13 +786,13 @@ def setup
   end
 
   test "circular require raises an error" do
-    assert_raise(Sprockets::CircularDependencyError) do
+    assert_raises(Sprockets::CircularDependencyError) do
       asset("circle/a.js")
     end
-    assert_raise(Sprockets::CircularDependencyError) do
+    assert_raises(Sprockets::CircularDependencyError) do
       asset("circle/b.js")
     end
-    assert_raise(Sprockets::CircularDependencyError) do
+    assert_raises(Sprockets::CircularDependencyError) do
       asset("circle/c.js")
     end
   end
@@ -887,11 +887,11 @@ def setup
   test "should not fail if home is not set in environment" do
     begin
       home, ENV["HOME"] = ENV["HOME"], nil
-      assert_nothing_raised do
-        env = Sprockets::Environment.new
-        env.append_path(fixture_path('asset'))
-        env['application.js']
-      end
+      env = Sprockets::Environment.new
+      env.append_path(fixture_path('asset'))
+      env['application.js']
+    rescue Exception
+      flunk
     ensure
       ENV["HOME"] = home
     end
diff --git a/test/test_asset_attributes.rb b/test/test_asset_attributes.rb
index 5969887..d5eba37 100644
--- a/test/test_asset_attributes.rb
+++ b/test/test_asset_attributes.rb
@@ -17,7 +17,7 @@ class TestAssetAttributes < Sprockets::TestCase
   end
 
   test "logical path" do
-    assert_raise Sprockets::FileOutsidePaths do
+    assert_raises Sprockets::FileOutsidePaths do
       pathname(fixture_path("missing/application.js")).logical_path
     end
 
diff --git a/test/test_encoding.rb b/test/test_encoding.rb
index f202ee0..a891fa7 100644
--- a/test/test_encoding.rb
+++ b/test/test_encoding.rb
@@ -27,7 +27,7 @@ def setup
     end
 
     test "read UTF-16 asset" do
-      assert_raise Sprockets::EncodingError do
+      assert_raises Sprockets::EncodingError do
         @env['utf16.js'].to_s
       end
     end
diff --git a/test/test_environment.rb b/test/test_environment.rb
index c26798d..206804d 100644
--- a/test/test_environment.rb
+++ b/test/test_environment.rb
@@ -558,7 +558,7 @@ def setup
       def foo; end
     end
 
-    assert_nothing_raised(NameError) { e1.context_class.instance_method(:foo) }
+    e1.context_class.instance_method(:foo)
     assert_raises(NameError) { e2.context_class.instance_method(:foo) }
   end
 
-- 
1.9.3