Commit 8224296a authored by Robert Speicher's avatar 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
......@@ -69,10 +69,10 @@
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"
......@@ -73,10 +73,9 @@
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
......
Supports Markdown
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