FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
documentcloud/test/test_helper.rb at diffdocs · documentcloud/documentcloud · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Mar 11, 2021. It is now read-only.
documentcloud
/
documentcloud
Public archive
Notifications
You must be signed in to change notification settings
Fork
157
Star
425
Code
Issues
194
Pull requests
16
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
documentcloud
/
test
/
test_helper.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (35 loc) · 1.78 KB
Breadcrumbs
documentcloud
/
test
/
test_helper.rb
Copy path
File metadata and controls
39 lines (35 loc) · 1.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ENV
[
"RAILS_ENV"
]
=
"test"
require
File
.
expand_path
(
File
.
dirname
(
__FILE__
)
+
"/../config/environment"
)
require
'test_help'
require
'redgreen'
class
ActiveSupport
::
TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded
# between every test method. Fewer database queries means faster tests.
#
# Read Mike Clark's excellent walkthrough at
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
#
# Every Active Record database supports transactions except MyISAM tables
# in MySQL. Turn off transactional fixtures in this case; however, if you
# don't care one way or the other, switching from MyISAM to InnoDB tables
# is recommended.
#
# The only drawback to using transactional fixtures is when you actually
# need to test transactions. Since your test is bracketed by a transaction,
# any transactions started in your code will be automatically rolled back.
self
.
use_transactional_fixtures
=
true
# Instantiated fixtures are slow, but give you @david where otherwise you
# would need people(:david). If you don't want to migrate your existing
# test cases which use the @david style and don't mind the speed hit (each
# instantiated fixtures translates to a database query per test method),
# then set this back to true.
# self.use_instantiated_fixtures = false
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures
:all
# Add more helper methods to be used by all tests here...
end
Back
|
FazBrowse Home
|
New Git URL