Class: Cucumber::Rake::Task::InProcessCucumberRunner
- Includes:
- Rake::DSL
- Defined in:
- lib/cucumber/rake/task.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
-
#initialize(libs, cucumber_opts, feature_files) ⇒ InProcessCucumberRunner
constructor
A new instance of InProcessCucumberRunner.
- #run ⇒ Object
Constructor Details
#initialize(libs, cucumber_opts, feature_files) ⇒ InProcessCucumberRunner
Returns a new instance of InProcessCucumberRunner.
42 43 44 45 46 47 48 49 |
# File 'lib/cucumber/rake/task.rb', line 42 def initialize(libs, cucumber_opts, feature_files) raise "libs must be an Array when running in-process" unless Array === libs libs.reverse.each{|lib| $LOAD_PATH.unshift(lib)} @args = ( cucumber_opts + feature_files ).flatten.compact end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
40 41 42 |
# File 'lib/cucumber/rake/task.rb', line 40 def args @args end |
Instance Method Details
#run ⇒ Object
51 52 53 54 55 |
# File 'lib/cucumber/rake/task.rb', line 51 def run require 'cucumber/cli/main' failure = Cucumber::Cli::Main.execute(args) raise "Cucumber failed" if failure end |