BigW Consortium Gitlab

public_snippets.rb 680 Bytes
Newer Older
Valery Sizov committed
1 2 3 4 5 6
class Spinach::Features::PublicSnippets < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths
  include SharedSnippet

  step 'I should see snippet "Personal snippet one"' do
7
    expect(page).to have_no_xpath("//i[@class='public-snippet']")
Valery Sizov committed
8 9
  end

10
  step 'I should see raw snippet "Personal snippet one"' do
11
    expect(page).to have_text(snippet.content)
12 13
  end

Valery Sizov committed
14 15 16 17
  step 'I visit snippet page "Personal snippet one"' do
    visit snippet_path(snippet)
  end

18 19 20 21
  step 'I visit snippet raw page "Personal snippet one"' do
    visit raw_snippet_path(snippet)
  end

Valery Sizov committed
22 23 24 25
  def snippet
    @snippet ||= PersonalSnippet.find_by!(title: "Personal snippet one")
  end
end