From 700d4387ce3d57330ed76e6b8545f27996d99c5f Mon Sep 17 00:00:00 2001
From: Robert Speicher <rspeicher@gmail.com>
Date: Sun, 31 May 2015 23:38:07 -0400
Subject: [PATCH] Use stub_const to stub constants instead of redefining them

They're called constants for a reason, after all.
---
 features/steps/project/commits/commits.rb | 3 +--
 1 file changed, 1 insertion(+), 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
-- 
2.30.9