Commit 700d4387 authored by Robert Speicher's avatar Robert Speicher

Use stub_const to stub constants instead of redefining them

They're called constants for a reason, after all.
parent 1f9a2ab7
...@@ -69,14 +69,13 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -69,14 +69,13 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end end
step 'I visit big commit page' do 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) visit namespace_project_commit_path(@project.namespace, @project, sample_big_commit.id)
end end
step 'I see big commit warning' do step 'I see big commit warning' do
page.should have_content sample_big_commit.message page.should have_content sample_big_commit.message
page.should have_content "Too many changes" page.should have_content "Too many changes"
Commit::DIFF_SAFE_FILES = 100
end end
step 'I visit a commit with an image that changed' do step 'I visit a commit with an image that changed' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment