Sha256: fc94b54229e93e5dd084d35f1f7b85c87c6e1d19873bdf82054b0a033cda9788

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true

Given('I have a file {string} with content:') do |file, content|
  File.write(file, content)
end

When('I run jekyll build') do
  run_jekyll
end

Then('the file {string} should exist') do |file|
  assert File.exist?(file)
end

Then('I should see svg output in {string}') do |file|
  assert_match %r{<svg(.|\r|\n)*?>(.|\r|\n)*</svg>}, File.read(file)
end

Then('I should see {string} in {string}') do |pattern, file|
  assert_match Regexp.new(pattern), File.read(file)
end

Then('I should not see {string} in {string}') do |pattern, file|
  refute_match Regexp.new(pattern), File.read(file)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-diagrams-0.9.3 features/step_definitions/jekyll-diagrams.rb
jekyll-diagrams-0.9.2 features/step_definitions/jekyll-diagrams.rb