Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
2838a993
Commit
2838a993
authored
Jun 07, 2014
by
Jeroen van Baarsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB cleaner reverted to a known working version
Signed-off-by:
Jeroen van Baarsen
<
jeroenvanbaarsen@gmail.com
>
parent
7cf1a425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
spec/support/db_cleaner.rb
spec/support/db_cleaner.rb
+31
-10
No files found.
spec/support/db_cleaner.rb
View file @
2838a993
# RSpec.configure do |config|
# config.around(:each) do |example|
# DatabaseCleaner.strategy = :transaction
# DatabaseCleaner.clean_with(:truncation)
# DatabaseCleaner.cleaning do
# example.run
# end
# end
# config.around(:each, js: true) do |example|
# DatabaseCleaner.strategy = :truncation
# DatabaseCleaner.clean_with(:truncation)
# DatabaseCleaner.cleaning do
# example.run
# end
# end
# end
RSpec
.
configure
do
|
config
|
config
.
before
(
:suite
)
do
DatabaseCleaner
.
clean_with
(
:truncation
)
end
config
.
around
(
:each
)
do
|
example
|
config
.
before
(
:each
)
do
DatabaseCleaner
.
strategy
=
:transaction
DatabaseCleaner
.
clean_with
(
:truncation
)
DatabaseCleaner
.
cleaning
do
example
.
run
end
end
config
.
around
(
:each
,
js:
true
)
do
|
example
|
config
.
before
(
:each
,
:js
=>
true
)
do
DatabaseCleaner
.
strategy
=
:truncation
DatabaseCleaner
.
clean_with
(
:truncation
)
DatabaseCleaner
.
cleaning
do
example
.
run
end
end
config
.
before
(
:each
)
do
DatabaseCleaner
.
start
end
config
.
after
(
:each
)
do
DatabaseCleaner
.
clean
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment