Module: Cucumber

Defined in:
lib/cucumber/cli/drb_client.rb,
lib/cucumber.rb,
lib/cucumber/ast.rb,
lib/cucumber/errors.rb,
lib/cucumber/runtime.rb,
lib/cucumber/ast/step.rb,
lib/cucumber/ast/tags.rb,
lib/cucumber/cli/main.rb,
lib/cucumber/platform.rb,
lib/cucumber/ast/table.rb,
lib/cucumber/rake/task.rb,
lib/cucumber/step_match.rb,
lib/cucumber/ast/comment.rb,
lib/cucumber/ast/feature.rb,
lib/cucumber/ast/visitor.rb,
lib/cucumber/broadcaster.rb,
lib/cucumber/cli/options.rb,
lib/cucumber/constantize.rb,
lib/cucumber/step_mother.rb,
lib/cucumber/ast/examples.rb,
lib/cucumber/ast/features.rb,
lib/cucumber/ast/scenario.rb,
lib/cucumber/feature_file.rb,
lib/cucumber/formatter/io.rb,
lib/cucumber/ast/py_string.rb,
lib/cucumber/configuration.rb,
lib/cucumber/formatter/pdf.rb,
lib/cucumber/step_argument.rb,
lib/cucumber/ast/background.rb,
lib/cucumber/formatter/html.rb,
lib/cucumber/formatter/json.rb,
lib/cucumber/ast/tree_walker.rb,
lib/cucumber/formatter/debug.rb,
lib/cucumber/formatter/junit.rb,
lib/cucumber/formatter/rerun.rb,
lib/cucumber/formatter/steps.rb,
lib/cucumber/formatter/usage.rb,
lib/cucumber/runtime/results.rb,
lib/cucumber/formatter/pretty.rb,
lib/cucumber/language_support.rb,
lib/cucumber/step_definitions.rb,
lib/cucumber/ast/outline_table.rb,
lib/cucumber/cli/configuration.rb,
lib/cucumber/formatter/console.rb,
lib/cucumber/formatter/gpretty.rb,
lib/cucumber/formatter/summary.rb,
lib/cucumber/formatter/unicode.rb,
lib/cucumber/rb_support/rb_dsl.rb,
lib/cucumber/cli/profile_loader.rb,
lib/cucumber/formatter/duration.rb,
lib/cucumber/formatter/progress.rb,
lib/cucumber/formatter/stepdefs.rb,
lib/cucumber/rb_support/rb_hook.rb,
lib/cucumber/ast/feature_element.rb,
lib/cucumber/ast/step_collection.rb,
lib/cucumber/ast/step_invocation.rb,
lib/cucumber/formatter/ansicolor.rb,
lib/cucumber/rb_support/rb_world.rb,
lib/cucumber/ast/scenario_outline.rb,
lib/cucumber/runtime/support_code.rb,
lib/cucumber/formatter/json_pretty.rb,
lib/cucumber/step_definition_light.rb,
lib/cucumber/core_ext/instance_exec.rb,
lib/cucumber/js_support/js_language.rb,
lib/cucumber/js_support/js_snippets.rb,
lib/cucumber/parser/gherkin_builder.rb,
lib/cucumber/py_support/py_language.rb,
lib/cucumber/rb_support/rb_language.rb,
lib/cucumber/runtime/user_interface.rb,
lib/cucumber/rb_support/rb_transform.rb,
lib/cucumber/runtime/features_loader.rb,
lib/cucumber/wire_support/connection.rb,
lib/cucumber/wire_support/wire_packet.rb,
lib/cucumber/wire_support/configuration.rb,
lib/cucumber/wire_support/wire_language.rb,
lib/cucumber/wire_support/wire_protocol.rb,
lib/cucumber/wire_support/wire_exception.rb,
lib/cucumber/formatter/ordered_xml_markup.rb,
lib/cucumber/wire_support/request_handler.rb,
lib/cucumber/rb_support/rb_step_definition.rb,
lib/cucumber/language_support/language_methods.rb,
lib/cucumber/runtime/for_programming_languages.rb,
lib/cucumber/wire_support/wire_step_definition.rb,
lib/cucumber/rb_support/regexp_argument_matcher.rb,
lib/cucumber/formatter/gherkin_formatter_adapter.rb,
lib/cucumber/wire_support/wire_protocol/requests.rb

Overview

This code was taken from the RSpec project and slightly modified.

Defined Under Namespace

Modules: Ast, Cli, Constantize, Formatter, JsSupport, LanguageSupport, Parser, PySupport, Rake, RbSupport, WindowsOutput, WireSupport Classes: Ambiguous, ArityMismatchError, Broadcaster, Configuration, FeatureFile, NoStepMatch, Pending, Runtime, StepArgument, StepDefinitionLight, StepDefinitions, StepMatch, StepMother, TagExcess, Undefined

Constant Summary collapse

VERSION =
'0.10.0'
BINARY =
File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
LIBDIR =
File.expand_path(File.dirname(__FILE__) + '/../../lib')
JRUBY =
defined?(JRUBY_VERSION)
IRONRUBY =
defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
WINDOWS =
RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
OS_X =
RbConfig::CONFIG['host_os'] =~ /darwin/
WINDOWS_MRI =
WINDOWS && !JRUBY && !IRONRUBY
RAILS =
defined?(Rails)
RUBY_BINARY =
File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
RUBY_1_9 =
RUBY_VERSION =~ /^1\.9/
RUBY_1_8_7 =
RUBY_VERSION =~ /^1\.8\.7/
CODEPAGE =
"cp1252"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.use_full_backtraceObject

Returns the value of attribute use_full_backtrace.



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

def use_full_backtrace
  @use_full_backtrace
end

.wants_to_quitObject

Returns the value of attribute wants_to_quit.



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

def wants_to_quit
  @wants_to_quit
end

Class Method Details

.file_mode(m) ⇒ Object

:nodoc:



23
24
25
# File 'lib/cucumber/platform.rb', line 23

def file_mode(m) #:nodoc:
  RUBY_1_9 ? "#{m}:UTF-8" : m
end

.loggerObject



16
17
18
19
20
21
# File 'lib/cucumber.rb', line 16

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

.logger=(logger) ⇒ Object



23
24
25
# File 'lib/cucumber.rb', line 23

def logger=(logger)
  @log = logger
end