Commit 4561a09c authored by Charles Bushong's avatar Charles Bushong

Cleaning for the hound

parent 858dbd08
...@@ -20,9 +20,24 @@ module SharedSnippet ...@@ -20,9 +20,24 @@ module SharedSnippet
end end
And 'I have a public many lined snippet' do And 'I have a public many lined snippet' do
create(:personal_snippet, create(:personal_snippet,
title: "Many lined snippet", title: 'Many lined snippet',
content: "line one\nline two\nline three\nline four\nline five\nline six\nline seven\nline eight\nline nine\nline ten\nline eleven\nline twelve\nline thirteen\nline fourteen", content: <<-END.gsub(/^\s+\|/, ''),
file_name: "many_lined_snippet.rb", |line one
|line two
|line three
|line four
|line five
|line six
|line seven
|line eight
|line nine
|line ten
|line eleven
|line twelve
|line thirteen
|line fourteen
END
file_name: 'many_lined_snippet.rb',
private: true, private: true,
author: current_user) author: current_user)
end end
......
...@@ -6,51 +6,51 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps ...@@ -6,51 +6,51 @@ class Spinach::Features::SnippetSearch < Spinach::FeatureSteps
include SharedSearch include SharedSearch
step 'I search for "snippet" in snippet titles' do step 'I search for "snippet" in snippet titles' do
search_snippet_titles "snippet" search_snippet_titles 'snippet'
end end
step 'I search for "snippet private" in snippet titles' do step 'I search for "snippet private" in snippet titles' do
search_snippet_titles "snippet private" search_snippet_titles 'snippet private'
end end
step 'I search for "line seven" in snippet contents' do step 'I search for "line seven" in snippet contents' do
search_snippet_contents "line seven" search_snippet_contents 'line seven'
end end
step 'I should see "line seven" in results' do step 'I should see "line seven" in results' do
page.should have_content "line seven" page.should have_content 'line seven'
end end
step 'I should see "line four" in results' do step 'I should see "line four" in results' do
page.should have_content "line four" page.should have_content 'line four'
end end
step 'I should see "line ten" in results' do step 'I should see "line ten" in results' do
page.should have_content "line ten" page.should have_content 'line ten'
end end
step 'I should not see "line eleven" in results' do step 'I should not see "line eleven" in results' do
page.should_not have_content "line eleven" page.should_not have_content 'line eleven'
end end
step 'I should not see "line three" in results' do step 'I should not see "line three" in results' do
page.should_not have_content "line three" page.should_not have_content 'line three'
end end
Then 'I should see "Personal snippet one" in results' do Then 'I should see "Personal snippet one" in results' do
page.should have_content "Personal snippet one" page.should have_content 'Personal snippet one'
end end
And 'I should see "Personal snippet private" in results' do And 'I should see "Personal snippet private" in results' do
page.should have_content "Personal snippet private" page.should have_content 'Personal snippet private'
end end
Then 'I should not see "Personal snippet one" in results' do Then 'I should not see "Personal snippet one" in results' do
page.should_not have_content "Personal snippet one" page.should_not have_content 'Personal snippet one'
end end
And 'I should not see "Personal snippet private" in results' do And 'I should not see "Personal snippet private" in results' do
page.should_not have_content "Personal snippet private" page.should_not have_content 'Personal snippet private'
end end
end end
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