Sha256: c21b2af13a919a41e1ddb47704ef621634ab44db97ccc1bdadd1c121ebb8fbf1

Contents?: true

Size: 869 Bytes

Versions: 2

Compression:

Stored size: 869 Bytes

Contents

require 'allure-ruby-adaptor-api'
require 'allure-rspec/version'
require 'allure-rspec/formatter'
require 'allure-rspec/adaptor'
require 'allure-rspec/dsl'
require 'allure-rspec/hooks'

module AllureRSpec
  include AllureRSpec::DSL

  module Config
    class << self
      attr_accessor :output_dir
      attr_accessor :clean_dir

      DEFAULT_OUTPUT_DIR = 'allure/data'

      def output_dir
        @output_dir || DEFAULT_OUTPUT_DIR
      end

      def clean_dir?
        @clean_dir.nil? ? true : @clean_dir
      end
    end
  end

  class Context
    attr_accessor :rspec

    def rspec
      @rspec
    end
  end

  class << self
    def context
      @context ||= Context.new
    end
  end

  class << self
    def configure(&block)
      yield Config
      AllureRubyAdaptorApi.configure {|c|
        c.output_dir = Config.output_dir
      }
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
allure-rspec-0.5.4 lib/allure-rspec.rb
allure-rspec-0.5.3 lib/allure-rspec.rb