Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
8224296a7922
Commit
700d4387
authored
May 31, 2015
by
Robert Speicher
Browse files
Use stub_const to stub constants instead of redefining them
They're called constants for a reason, after all.
parent
f553b6cde5ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
features/steps/project/commits/commits.rb
View file @
8224296a
...
...
@@ -69,14 +69,13 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step
'I visit big commit page'
do
Commit
::
DIFF_SAFE_FILES
=
20
stub_const
(
'
Commit::DIFF_SAFE_FILES
'
,
20
)
visit
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
sample_big_commit
.
id
)
end
step
'I see big commit warning'
do
page
.
should
have_content
sample_big_commit
.
message
page
.
should
have_content
"Too many changes"
Commit
::
DIFF_SAFE_FILES
=
100
end
step
'I visit a commit with an image that changed'
do
...
...
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