1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use the Ruby load path for test_helper requires. Fix AM::TestCase.

This commit is contained in:
Jeremy Kemper 2008-11-15 20:25:14 -08:00
parent 9e9dde617f
commit d7bad6e2eb
7 changed files with 12 additions and 21 deletions

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper'))
require 'test_helper'
class ObservedModel < ActiveModel::Base
class Observer

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper'))
require 'test_helper'
class EventTest < ActiveModel::TestCase
def setup

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper'))
require 'test_helper'
class MachineTestSubject
include ActiveModel::StateMachine

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper'))
require 'test_helper'
class StateTestSubject
include ActiveModel::StateMachine

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper'))
require 'test_helper'
class StateTransitionTest < ActiveModel::TestCase
test 'should set from, to, and opts attr readers' do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper'))
require 'test_helper'
class StateMachineSubject
include ActiveModel::StateMachine

View file

@ -1,10 +1,6 @@
$:.unshift "#{File.dirname(__FILE__)}/../lib"
$:.unshift File.dirname(__FILE__)
require 'test/unit'
require 'active_model'
require 'active_model/state_machine'
require 'active_support/callbacks' # needed by ActiveModel::TestCase
require 'active_support/test_case'
def uses_gem(gem_name, test_name, version = '> 0')
@ -30,10 +26,5 @@ begin
rescue LoadError
end
ActiveSupport::TestCase.send :include, ActiveSupport::Testing::Default
module ActiveModel
class TestCase < ActiveSupport::TestCase
include ActiveSupport::Testing::Default
end
class ActiveModel::TestCase < ActiveSupport::TestCase
end