aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorMarcin Olichwirowicz <olichwirowicz@gmail.com>2015-08-21 22:33:50 +0200
committerMarcin Olichwirowicz <olichwirowicz@gmail.com>2015-08-24 12:24:07 +0200
commit3a161e65e76a83be6d62c424227fe10b5b66b77d (patch)
tree0c16ac99bd0b4f9735e0dc9e85778af255819e13 /actionpack/test/dispatch/routing_test.rb
parent90bcb6dea7f8fc8b93b4266180465fc0c0785c01 (diff)
downloadrails-3a161e65e76a83be6d62c424227fe10b5b66b77d.tar.gz
rails-3a161e65e76a83be6d62c424227fe10b5b66b77d.tar.bz2
rails-3a161e65e76a83be6d62c424227fe10b5b66b77d.zip
Get rid of mocha tests - part 1
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 332a550de0..8972f3e74d 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1,4 +1,3 @@
-# encoding: UTF-8
require 'erb'
require 'abstract_unit'
require 'controller/fake_controllers'
@@ -4190,11 +4189,11 @@ class TestNamedRouteUrlHelpers < ActionDispatch::IntegrationTest
include Routes.url_helpers
test "url helpers do not ignore nil parameters when using non-optimized routes" do
- Routes.stubs(:optimize_routes_generation?).returns(false)
-
- get "/categories/1"
- assert_response :success
- assert_raises(ActionController::UrlGenerationError) { product_path(nil) }
+ Routes.stub :optimize_routes_generation?, false do
+ get "/categories/1"
+ assert_response :success
+ assert_raises(ActionController::UrlGenerationError) { product_path(nil) }
+ end
end
end