mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
fix bug in unit test causing spurious failures, and make sure the
unit test requires the Rails libraries from *Source Control* first, or we'll get false positives. add ActiveRecord require to abstract_unit.rb. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -155,8 +155,8 @@ module DispatcherTest
|
||||
web_service_dispatching_mode :direct
|
||||
wsdl_namespace WsdlNamespace
|
||||
|
||||
before_filter :alwaysfail, :only => [:before_filtered]
|
||||
after_filter :alwaysok, :only => [:after_filtered]
|
||||
before_invocation :alwaysfail, :only => [:before_filtered]
|
||||
after_invocation :alwaysok, :only => [:after_filtered]
|
||||
|
||||
attr :added
|
||||
attr :added2
|
||||
@@ -232,12 +232,12 @@ module DispatcherTest
|
||||
end
|
||||
|
||||
protected
|
||||
def alwaysfail
|
||||
def alwaysfail(method_name, params)
|
||||
@before_filter_called = true
|
||||
false
|
||||
end
|
||||
|
||||
def alwaysok
|
||||
def alwaysok(method_name, params, return_value)
|
||||
@after_filter_called = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
||||
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
||||
$:.unshift(File.dirname(__FILE__) + '/../../actionpack/lib')
|
||||
$:.unshift(File.dirname(__FILE__) + '/../../activerecord/lib')
|
||||
|
||||
require 'test/unit'
|
||||
require 'active_record'
|
||||
require 'action_web_service'
|
||||
require 'action_controller'
|
||||
require 'action_controller/test_process'
|
||||
|
||||
Reference in New Issue
Block a user