Sha256: 084a208ba387191e403323c8d53e961784f61a1deaf57557d0aee901893767fd

Contents?: true

Size: 760 Bytes

Versions: 18

Compression:

Stored size: 760 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 rspec? -%>

    def formatter
      AllureRspecFormatter
    end
  <%- end -%>
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby_raider-1.1.1 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.1.0 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.9 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.8 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.7 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.6 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.5 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.4 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.3 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.2 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.1 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-1.0.0 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.9 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.8 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.7 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.6 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.5 lib/generators/templates/helpers/allure_helper.tt
ruby_raider-0.9.4 lib/generators/templates/helpers/allure_helper.tt