Skip to content

Commit

Permalink
Add guards against Rails < 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal committed Mar 9, 2009
1 parent ce10a05 commit 55d6585
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/lib/activerecord_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
class ActiveRecordTestCase < Test::Unit::TestCase
include ActiveSupport::Testing::SetupAndTeardown

include ActiveRecord::TestFixtures
if defined?(ActiveRecord::TestFixtures)
include ActiveRecord::TestFixtures
end
# Set our fixture path
if ActiveRecordTestConnector.able_to_connect
self.fixture_path = File.join(File.dirname(__FILE__), '..', 'fixtures')
Expand Down
8 changes: 6 additions & 2 deletions test/lib/view_test_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
ActionController::Base.perform_caching = false

class WillPaginate::ViewTestCase < Test::Unit::TestCase
include ActionController::TestCase::Assertions
include ActiveSupport::Testing::Deprecation
if defined?(ActionController::TestCase::Assertions)
include ActionController::TestCase::Assertions
end
if defined?(ActiveSupport::Testing::Deprecation)
include ActiveSupport::Testing::Deprecation
end

def setup
super
Expand Down

0 comments on commit 55d6585

Please sign in to comment.