Module: Cucumber

Defined in:
lib/cucumber.rb,
lib/cucumber/ast.rb,
lib/cucumber/unit.rb,
lib/cucumber/hooks.rb,
lib/cucumber/events.rb,
lib/cucumber/errors.rb,
lib/cucumber/runtime.rb,
lib/cucumber/platform.rb,
lib/cucumber/cli/main.rb,
lib/cucumber/load_path.rb,
lib/cucumber/deprecate.rb,
lib/cucumber/rake/task.rb,
lib/cucumber/events/bus.rb,
lib/cucumber/file_specs.rb,
lib/cucumber/step_match.rb,
lib/cucumber/cli/options.rb,
lib/cucumber/constantize.rb,
lib/cucumber/formatter/io.rb,
lib/cucumber/filters/quit.rb,
lib/cucumber/gherkin/i18n.rb,
lib/cucumber/step_argument.rb,
lib/cucumber/filters/retry.rb,
lib/cucumber/configuration.rb,
lib/cucumber/term/ansicolor.rb,
lib/cucumber/formatter/json.rb,
lib/cucumber/formatter/html.rb,
lib/cucumber/cli/rerun_file.rb,
lib/cucumber/formatter/junit.rb,
lib/cucumber/formatter/debug.rb,
lib/cucumber/formatter/steps.rb,
lib/cucumber/formatter/rerun.rb,
lib/cucumber/formatter/usage.rb,
lib/cucumber/step_definitions.rb,
lib/cucumber/formatter/pretty.rb,
lib/cucumber/formatter/fanout.rb,
lib/cucumber/events/step_match.rb,
lib/cucumber/formatter/unicode.rb,
lib/cucumber/formatter/summary.rb,
lib/cucumber/formatter/console.rb,
lib/cucumber/rb_support/rb_dsl.rb,
lib/cucumber/cli/configuration.rb,
lib/cucumber/running_test_case.rb,
lib/cucumber/step_match_search.rb,
lib/cucumber/multiline_argument.rb,
lib/cucumber/formatter/duration.rb,
lib/cucumber/formatter/stepdefs.rb,
lib/cucumber/formatter/progress.rb,
lib/cucumber/filters/randomizer.rb,
lib/cucumber/filters/tag_limits.rb,
lib/cucumber/rb_support/rb_hook.rb,
lib/cucumber/rb_support/snippet.rb,
lib/cucumber/cli/profile_loader.rb,
lib/cucumber/runtime/step_hooks.rb,
lib/cucumber/project_initializer.rb,
lib/cucumber/formatter/ansicolor.rb,
lib/cucumber/formatter/fail_fast.rb,
lib/cucumber/rb_support/rb_world.rb,
lib/cucumber/runtime/after_hooks.rb,
lib/cucumber/gherkin/steps_parser.rb,
lib/cucumber/runtime/support_code.rb,
lib/cucumber/runtime/before_hooks.rb,
lib/cucumber/formatter/interceptor.rb,
lib/cucumber/formatter/json_pretty.rb,
lib/cucumber/filters/prepare_world.rb,
lib/cucumber/step_definition_light.rb,
lib/cucumber/events/after_test_case.rb,
lib/cucumber/events/after_test_step.rb,
lib/cucumber/filters/activate_steps.rb,
lib/cucumber/filters/gated_receiver.rb,
lib/cucumber/rb_support/rb_language.rb,
lib/cucumber/runtime/user_interface.rb,
lib/cucumber/core_ext/instance_exec.rb,
lib/cucumber/events/before_test_step.rb,
lib/cucumber/events/finished_testing.rb,
lib/cucumber/events/before_test_case.rb,
lib/cucumber/rb_support/rb_transform.rb,
lib/cucumber/formatter/legacy_api/ast.rb,
lib/cucumber/filters/apply_after_hooks.rb,
lib/cucumber/gherkin/data_table_parser.rb,
lib/cucumber/formatter/event_bus_report.rb,
lib/cucumber/formatter/backtrace_filter.rb,
lib/cucumber/filters/apply_around_hooks.rb,
lib/cucumber/filters/apply_before_hooks.rb,
lib/cucumber/gherkin/formatter/escaping.rb,
lib/cucumber/filters/tag_limits/verifier.rb,
lib/cucumber/formatter/duration_extractor.rb,
lib/cucumber/formatter/legacy_api/results.rb,
lib/cucumber/formatter/legacy_api/adapter.rb,
lib/cucumber/formatter/hook_query_visitor.rb,
lib/cucumber/rb_support/rb_step_definition.rb,
lib/cucumber/multiline_argument/doc_string.rb,
lib/cucumber/multiline_argument/data_table.rb,
lib/cucumber/filters/apply_after_step_hooks.rb,
lib/cucumber/gherkin/formatter/ansi_escapes.rb,
lib/cucumber/formatter/ignore_missing_messages.rb,
lib/cucumber/runtime/for_programming_languages.rb,
lib/cucumber/filters/tag_limits/test_case_index.rb,
lib/cucumber/formatter/legacy_api/runtime_facade.rb

Defined Under Namespace

Modules: Ast, Cli, Constantize, Deprecate, Events, Filters, FixRuby21Bug9285, Formatter, Gherkin, Hooks, LoadPath, MultilineArgument, Rake, RbSupport, RunningTestCase, StepMatchSearch, Term Classes: Ambiguous, ArityMismatchError, Configuration, FeatureFolderNotFoundException, FileException, FileNotFoundException, FileSpecs, NoStepMatch, Pending, ProjectInitializer, Runtime, SkippingStepMatch, StepArgument, StepDefinitionLight, StepDefinitions, StepMatch, TagExcess, Undefined, UndefinedDynamicStep, Unit

Constant Summary

VERSION =
File.read(File.expand_path("../version", __FILE__))
BINARY =
File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
LIBDIR =
File.expand_path(File.dirname(__FILE__) + '/../../lib')
RAILS =
defined?(Rails)
RUBY_BINARY =
File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
RUBY_2_2 =
RUBY_VERSION =~ /^2\.2/
RUBY_2_1 =
RUBY_VERSION =~ /^2\.1/
RUBY_2_3 =
RUBY_VERSION =~ /^2\.3/
CODEPAGE =
"cp1252"

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.use_full_backtraceObject

Returns the value of attribute use_full_backtrace



18
19
20
# File 'lib/cucumber/platform.rb', line 18

def use_full_backtrace
  @use_full_backtrace
end

.wants_to_quitObject

Returns the value of attribute wants_to_quit



11
12
13
# File 'lib/cucumber.rb', line 11

def wants_to_quit
  @wants_to_quit
end

Class Method Details

.deprecate(*args) ⇒ Object



25
26
27
# File 'lib/cucumber/deprecate.rb', line 25

def self.deprecate(*args)
  Deprecate::Strategy.call(*args)
end

.loggerObject



13
14
15
16
17
18
# File 'lib/cucumber.rb', line 13

def logger
  return @log if @log
  @log = Logger.new(STDOUT)
  @log.level = Logger::INFO
  @log
end

.logger=(logger) ⇒ Object



20
21
22
# File 'lib/cucumber.rb', line 20

def logger=(logger)
  @log = logger
end

Instance Method Details

#Hash(other) ⇒ Object

Backported from Ruby 2.0 to 1.9

Raises:

  • (TypeError)


26
27
28
29
30
# File 'lib/cucumber.rb', line 26

def Hash(other)
  return {} if other.nil? || other == []
  raise TypeError, "can't convert #{other.class} into Hash" unless other.respond_to?(:to_hash)
  other.to_hash
end