Bringing various things inline with the current state of Rails develolpment
This commit is contained in:
parent
0a63789e61
commit
8de7ca3cee
38 changed files with 204 additions and 5484 deletions
|
@ -1,5 +1,5 @@
|
|||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.dirname(__FILE__) + '/../config/environment'
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
|
||||
require 'application'
|
||||
require 'test/unit'
|
||||
require 'action_controller/test_process'
|
||||
|
@ -56,23 +56,6 @@ class Test::Unit::TestCase
|
|||
ApplicationController.wiki = nil
|
||||
end
|
||||
|
||||
|
||||
# Checks that a given URI path is recognized as expected options
|
||||
# Delete it when patch #638 is commiteed to Rails (http://dev.rubyonrails.org/ticket/638)
|
||||
def assert_recognizes(expected_options, path)
|
||||
# Load routes.rb if it hasn't been loaded.
|
||||
ActionController::Routing::Routes.reload if ActionController::Routing::Routes.empty?
|
||||
|
||||
# Assume given controller
|
||||
request = ActionController::TestRequest.new({}, {}, nil)
|
||||
request.path = path
|
||||
ActionController::Routing::Routes.recognize!(request)
|
||||
|
||||
msg = build_message(nil, "The recognized options <?> did not match <?>",
|
||||
request.path_parameters, expected_options)
|
||||
assert_block(msg) { request.path_parameters == expected_options }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class WikiServiceWithNoPersistence
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue