summaryrefslogtreecommitdiff
path: root/features/steps/snippets/discover.rb
blob: 09337937002a27c0fef80d71e6a6258c42300283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class DiscoverSnippets < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths
  include SharedSnippet

  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
    @snippet ||= PersonalSnippet.find_by!(title: "Personal snippet one")
  end
end