BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7a89cef6
Commit
7a89cef6
authored
Jun 07, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7092 from jvanbaarsen/tmp-fix-for-rspec
Temp fix for rspec so the specs are run again
parents
4dcf2f1c
2838a993
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
Gemfile.lock
Gemfile.lock
+1
-1
spec_helper.rb
spec/spec_helper.rb
+2
-1
db_cleaner.rb
spec/support/db_cleaner.rb
+21
-3
No files found.
Gemfile.lock
View file @
7a89cef6
...
...
@@ -89,7 +89,7 @@ GEM
d3_rails (3.1.10)
railties (>= 3.1.0)
daemons (1.1.9)
database_cleaner (1.
2
.0)
database_cleaner (1.
3
.0)
debug_inspector (0.0.2)
default_value_for (3.0.0)
activerecord (>= 3.2.0, < 5.0)
...
...
spec/spec_helper.rb
View file @
7a89cef6
...
...
@@ -27,6 +27,8 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
WebMock
.
disable_net_connect!
(
allow_localhost:
true
)
RSpec
.
configure
do
|
config
|
config
.
use_transactional_fixtures
=
false
config
.
use_instantiated_fixtures
=
false
config
.
mock_with
:rspec
config
.
include
LoginHelpers
,
type: :feature
...
...
@@ -39,7 +41,6 @@ RSpec.configure do |config|
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config
.
use_transactional_fixtures
=
false
config
.
before
(
:suite
)
do
TestEnv
.
init
(
observers:
false
,
init_repos:
true
,
repos:
false
)
...
...
spec/support/db_cleaner.rb
View file @
7a89cef6
# 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
.
around
(
:each
)
do
config
.
before
(
:suite
)
do
DatabaseCleaner
.
clean_with
(
:truncation
)
end
config
.
around
(
:each
)
do
config
.
before
(
:each
)
do
DatabaseCleaner
.
strategy
=
:transaction
end
config
.
around
(
:each
,
js:
true
)
do
config
.
before
(
:each
,
:js
=>
true
)
do
DatabaseCleaner
.
strategy
=
:truncation
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