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
Léo-Paul Géneau
gitlab-ce
Commits
6dcbd646
Commit
6dcbd646
authored
Apr 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable mailer for Spinach
parent
b8ba0b75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
features/support/env.rb
features/support/env.rb
+1
-1
spec/support/test_env.rb
spec/support/test_env.rb
+8
-0
No files found.
features/support/env.rb
View file @
6dcbd646
...
@@ -35,7 +35,7 @@ Capybara.ignore_hidden_elements = false
...
@@ -35,7 +35,7 @@ Capybara.ignore_hidden_elements = false
DatabaseCleaner
.
strategy
=
:truncation
DatabaseCleaner
.
strategy
=
:truncation
Spinach
.
hooks
.
before_scenario
do
Spinach
.
hooks
.
before_scenario
do
TestEnv
.
init
TestEnv
.
init
(
mailer:
false
)
DatabaseCleaner
.
start
DatabaseCleaner
.
start
end
end
...
...
spec/support/test_env.rb
View file @
6dcbd646
...
@@ -21,6 +21,10 @@ module TestEnv
...
@@ -21,6 +21,10 @@ module TestEnv
#
#
disable_observers
if
opts
[
:observers
]
==
false
disable_observers
if
opts
[
:observers
]
==
false
# Disable mailer for spinach tests
disable_mailer
if
opts
[
:mailer
]
==
false
# Use tmp dir for FS manipulations
# Use tmp dir for FS manipulations
repos_path
=
Rails
.
root
.
join
(
'tmp'
,
'test-git-base-path'
)
repos_path
=
Rails
.
root
.
join
(
'tmp'
,
'test-git-base-path'
)
Gitlab
.
config
.
gitlab_shell
.
stub
(
repos_path:
repos_path
)
Gitlab
.
config
.
gitlab_shell
.
stub
(
repos_path:
repos_path
)
...
@@ -76,4 +80,8 @@ module TestEnv
...
@@ -76,4 +80,8 @@ module TestEnv
def
disable_observers
def
disable_observers
ActiveRecord
::
Base
.
observers
.
disable
(
:all
)
ActiveRecord
::
Base
.
observers
.
disable
(
:all
)
end
end
def
disable_mailer
ActionMailer
::
Base
.
perform_deliveries
=
false
end
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