aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/activerecord')
-rw-r--r--actionpack/test/activerecord/active_record_assertions_test.rb10
-rw-r--r--actionpack/test/activerecord/active_record_store_test.rb1
-rw-r--r--actionpack/test/activerecord/pagination_test.rb14
3 files changed, 15 insertions, 10 deletions
diff --git a/actionpack/test/activerecord/active_record_assertions_test.rb b/actionpack/test/activerecord/active_record_assertions_test.rb
index f5661d19cc..ebb7774fc9 100644
--- a/actionpack/test/activerecord/active_record_assertions_test.rb
+++ b/actionpack/test/activerecord/active_record_assertions_test.rb
@@ -1,5 +1,5 @@
require "#{File.dirname(__FILE__)}/../active_record_unit"
-require 'fixtures/company'
+require 'fixtures/company' if ActiveRecordTestConnector.able_to_connect
class ActiveRecordAssertionsController < ActionController::Base
self.template_root = "#{File.dirname(__FILE__)}/../fixtures/"
@@ -37,10 +37,10 @@ class ActiveRecordAssertionsController < ActionController::Base
# the safety dance......
def rescue_action(e) raise; end
end
-
+
class ActiveRecordAssertionsControllerTest < ActiveRecordTestCase
- fixtures :companies
-
+ fixtures :companies if ActiveRecordTestConnector.able_to_connect
+
def setup
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@@ -81,4 +81,4 @@ class ActiveRecordAssertionsControllerTest < ActiveRecordTestCase
assert_success
assert_invalid_record 'company'
end
-end \ No newline at end of file
+end
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb
index 96c147c7d0..f85bdeb466 100644
--- a/actionpack/test/activerecord/active_record_store_test.rb
+++ b/actionpack/test/activerecord/active_record_store_test.rb
@@ -70,6 +70,7 @@ class ActiveRecordStoreTest < Test::Unit::TestCase
session_class.create_table!
ENV['REQUEST_METHOD'] = 'GET'
+ ENV['REQUEST_URI'] = '/'
CGI::Session::ActiveRecordStore.session_class = session_class
@cgi = CGI.new
diff --git a/actionpack/test/activerecord/pagination_test.rb b/actionpack/test/activerecord/pagination_test.rb
index 386300c086..a32dd0369a 100644
--- a/actionpack/test/activerecord/pagination_test.rb
+++ b/actionpack/test/activerecord/pagination_test.rb
@@ -1,12 +1,16 @@
require File.dirname(__FILE__) + '/../active_record_unit'
-require 'fixtures/topic'
-require 'fixtures/reply'
-require 'fixtures/developer'
-require 'fixtures/project'
+if ActiveRecordTestConnector.able_to_connect
+ require 'fixtures/topic'
+ require 'fixtures/reply'
+ require 'fixtures/developer'
+ require 'fixtures/project'
+end
class PaginationTest < ActiveRecordTestCase
- fixtures :topics, :replies, :developers, :projects, :developers_projects
+ if ActiveRecordTestConnector.able_to_connect
+ fixtures :topics, :replies, :developers, :projects, :developers_projects
+ end
class PaginationController < ActionController::Base
self.template_root = "#{File.dirname(__FILE__)}/../fixtures/"