Skip to content
Newer
Older
100644 48 lines (38 sloc) 1.2 KB
672ce11 @dchelimsky only abort in test_help in production env
dchelimsky authored Sep 22, 2010
1 # Make double-sure the RAILS_ENV is not set to production,
2 # so fixtures aren't loaded into that environment
e6d503b @josevalim Update abort message (ht: tilsammans).
josevalim authored Sep 25, 2010
3 abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production?
5c48a89 @dhh Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_E…
dhh authored Nov 9, 2005
4
5da4d51 @rafaelfranca Add active_support/testing/autorun
rafaelfranca authored Dec 28, 2012
5 require 'active_support/testing/autorun'
b9f551a @josevalim Explicitly require files before monkey patching them.
josevalim authored Mar 23, 2010
6 require 'active_support/test_case'
7 require 'action_controller/test_case'
8 require 'action_dispatch/testing/integration'
c130409 Reorganize autoloads:
Carlhuda authored Dec 2, 2009
9
d91bee8 use Rails backtrace in tests
Francesco Rodriguez authored Oct 5, 2012
10 # Config Rails backtrace in tests.
11 require 'rails/backtrace_cleaner'
12 MiniTest.backtrace_filter = Rails.backtrace_cleaner
13
ce84df0 @rafaelfranca MiniTest is always defined in this case
rafaelfranca authored Jan 6, 2012
14 # Enable turn if it is available
15 begin
16 require 'turn'
df10279 update test_help to config properly turn natural language option
Francesco Rodriguez authored Jul 6, 2012
17
18 Turn.config do |c|
19 c.natural = true
20 end
ce84df0 @rafaelfranca MiniTest is always defined in this case
rafaelfranca authored Jan 6, 2012
21 rescue LoadError
0eb6e5e @dhh Moved Turn activation/dependency to railties
dhh authored Mar 31, 2011
22 end
23
44791a2 @yahonda Modified how to handle if ActiveRecord is defined.
yahonda authored Sep 30, 2011
24 if defined?(ActiveRecord::Base)
b17eb65 @jeremy Move fixtures settings from AR::TestCase to railties test_help
jeremy authored Nov 12, 2008
25 class ActiveSupport::TestCase
26 include ActiveRecord::TestFixtures
2110a52 Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the app…
Carl Lerche authored Oct 16, 2009
27 self.fixture_path = "#{Rails.root}/test/fixtures/"
b17eb65 @jeremy Move fixtures settings from AR::TestCase to railties test_help
jeremy authored Nov 12, 2008
28 end
582aa2e @jeremy Set up fixtures in app's test_help
jeremy authored Nov 7, 2008
29
7fc1edd @carlosantoniodasilva Remove deprecated stuff in ActionController
carlosantoniodasilva authored Sep 25, 2010
30 ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
e3bb9e7 @dhh Cleaned up test_helper
dhh authored Oct 15, 2005
31
a94220b @alexeymuranov Rename "Fixtures" class to "FixtureSet"
alexeymuranov authored May 12, 2012
32 def create_fixtures(*fixture_set_names, &block)
33 FixtureSet.create_fixtures(ActiveSupport::TestCase.fixture_path, fixture_set_names, {}, &block)
b17eb65 @jeremy Move fixtures settings from AR::TestCase to railties test_help
jeremy authored Nov 12, 2008
34 end
ccd18dc Should be RAILS_ROOT/test/fixtures.
Scott Barron authored Oct 15, 2005
35 end
4ad3721 @dhh Re-enable the debugger in testing
dhh authored Jan 9, 2008
36
fc4582f Final pass at removing the router from a global constant
Carlhuda authored Feb 25, 2010
37 class ActionController::TestCase
38 setup do
53e16d8 @josh Missed a few spots in railties
josh authored Mar 30, 2010
39 @routes = Rails.application.routes
fc4582f Final pass at removing the router from a global constant
Carlhuda authored Feb 26, 2010
40 end
41 end
42
8760add Get URL helpers working again in integration tests.
Carlhuda authored Feb 25, 2010
43 class ActionDispatch::IntegrationTest
5c9d23f @matthewrudy Make assert_recognizes work in IntegrationTest [#4390 state:committed]
matthewrudy authored Apr 24, 2010
44 setup do
45 @routes = Rails.application.routes
46 end
8760add Get URL helpers working again in integration tests.
Carlhuda authored Feb 26, 2010
47 end
Something went wrong with that request. Please try again.