Sha256: ad871cfee7a88aedc70deddacbf47e22170e2a6235ff8e46b5fc3c1e5ebf163d

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

module Cucumber
  # The base class for configuring settings for a Cucumber run.
  class Configuration
    def self.default
      new
    end

    def self.parse(argument)
      return new(argument) if argument.is_a?(Hash)
      argument
    end

    def initialize(user_options = {})
      @options = default_options.merge(user_options)
    end

    def dry_run?
      @options[:dry_run]
    end

    def guess?
      @options[:guess]
    end

    def strict?
      @options[:strict]
    end

    def expand?
      @options[:expand]
    end

    def paths
      @options[:paths]
    end

    def autoload_code_paths
      @options[:autoload_code_paths]
    end

  private

    def default_options
      {
        :autoload_code_paths => ['features/support', 'features/step_definitions']
      }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-1.2.5 lib/cucumber/configuration.rb
cucumber-1.2.3 lib/cucumber/configuration.rb
cucumber-1.2.2 lib/cucumber/configuration.rb