Sha256: 25b9a5c6ea128298f1489dad032b3582bfdc10d5817787e574f8a4ea1705eec0

Contents?: true

Size: 778 Bytes

Versions: 9

Compression:

Stored size: 778 Bytes

Contents

# frozen_string_literal: true

<%=- ERB.new(File.read(File.expand_path('./partials/allure_requirements.tt', __dir__))).result(binding).strip! -%>
<%- allure = ERB.new(File.read(File.expand_path('./partials/allure_imports.tt', __dir__))).result(binding).strip! -%>


module AllureHelper
  class << self
    def configure
      <%= allure %>.configure do |config|
        config.results_directory = 'allure-results'
        config.clean_results_directory = true
      end
    end

    def add_screenshot(name, file)
      Allure.add_attachment(
        name:,
        source: file,
        type: Allure::ContentType::PNG,
        test_case: true
       )
     end

  <%- if framework == 'rspec' -%>
    def formatter
      AllureRspecFormatter
    end
      <%- end -%>
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby_raider-0.9.3 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.2 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.1 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.0 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.8.9 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.8.8 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.8.6 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.8.5 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.8.3 lib/generators/templates/helpers/allure_helper.tt