Module: Cucumber

Defined in:
lib/cucumber/version.rb,
lib/cucumber/ast.rb,
lib/cucumber/world.rb,
lib/cucumber/filter.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/rails/world.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/parser/table.rb,
lib/cucumber/ast/py_string.rb,
lib/cucumber/ast/background.rb,
lib/cucumber/cli/drb_client.rb,
lib/cucumber/formatter/html.rb,
lib/cucumber/parser/feature.rb,
lib/cucumber/formatter/junit.rb,
lib/cucumber/formatter/rerun.rb,
lib/cucumber/formatter/steps.rb,
lib/cucumber/formatter/usage.rb,
lib/cucumber/step_definition.rb,
lib/cucumber/formatter/pretty.rb,
lib/cucumber/ast/outline_table.rb,
lib/cucumber/cli/configuration.rb,
lib/cucumber/formatter/console.rb,
lib/cucumber/formatter/profile.rb,
lib/cucumber/cli/profile_loader.rb,
lib/cucumber/formatter/color_io.rb,
lib/cucumber/formatter/duration.rb,
lib/cucumber/formatter/progress.rb,
lib/cucumber/parser/treetop_ext.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/formatter/tag_cloud.rb,
lib/cucumber/ast/scenario_outline.rb,
lib/cucumber/parser/i18n/language.rb,
lib/cucumber/core_ext/instance_exec.rb,
lib/cucumber/cli/language_help_formatter.rb,
lib/cucumber/formatter/ordered_xml_markup.rb

Overview

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

Defined Under Namespace

Modules: Ast, Cli, FeatureElement, Formatter, Parser, Rails, Rake, StepDefinitionMethods, StepMother, World Classes: Ambiguous, ArityMismatchError, Broadcaster, FeatureFile, Filter, MultipleWorld, NilWorld, NoStepMatch, Pending, Redundant, StepDefinition, StepMatch, Undefined, VERSION

Constant Summary collapse

LANGUAGE_FILE =

TODO: Move these constants and the file to Language. Update wiki

File.expand_path(File.dirname(__FILE__) + '/languages.yml')
LANGUAGES =
YAML.load_file(LANGUAGE_FILE)
BINARY =
File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
LIBDIR =
File.expand_path(File.dirname(__FILE__) + '/../../lib')
JRUBY =
defined?(JRUBY_VERSION)
IRONRUBY =
Config::CONFIG['sitedir'] =~ /IronRuby/
WINDOWS =
Config::CONFIG['host_os'] =~ /mswin|mingw/
WINDOWS_MRI =
WINDOWS && !JRUBY && !IRONRUBY
RAILS =
defined?(Rails)
RUBY_BINARY =
File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
RUBY_1_9 =
RUBY_VERSION =~ /^1\.9/
CODEPAGE =
"cp#{codepage}"

Class Method Summary collapse

Class Method Details

.file_mode(m) ⇒ Object



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

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