discover_snippets.rb 475 Bytes
Newer Older
1 2 3
class DiscoverSnippets < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths
Andrew8xx8's avatar
Andrew8xx8 committed
4
  include SharedSnippet
5 6 7 8 9 10 11 12 13 14

  Then 'I should see "Personal snippet one" in snippets' do
    page.should have_content "Personal snippet one"
  end

  And 'I should not see "Personal snippet private" in snippets' do
    page.should_not have_content "Personal snippet private"
  end

  def snippet
skv's avatar
skv committed
15
    @snippet ||= PersonalSnippet.find_by!(title: "Personal snippet one")
16 17
  end
end