summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-31 23:38:07 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-06-10 01:31:27 -0400
commit700d4387ce3d57330ed76e6b8545f27996d99c5f (patch)
tree2b278882cf078874c76a534f4a2600664353b554
parent1f9a2ab7c9faf9b3a5fcc2a8ea695efee2314196 (diff)
downloadgitlab-ce-700d4387ce3d57330ed76e6b8545f27996d99c5f.tar.gz
Use stub_const to stub constants instead of redefining them
They're called constants for a reason, after all.
-rw-r--r--features/steps/project/commits/commits.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb
index c888e82e207..30d53333b78 100644
--- a/features/steps/project/commits/commits.rb
+++ b/features/steps/project/commits/commits.rb
@@ -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