Class: Cucumber::Rake::FeatureTask

Inherits:
Task show all
Defined in:
lib/cucumber/rake/task.rb

Constant Summary

Constants inherited from Task

Task::LIB

Instance Attribute Summary

Attributes inherited from Task

#binary, #cucumber_opts, #feature_list, #feature_pattern, #libs, #rcov, #rcov_opts, #step_list, #step_pattern

Instance Method Summary collapse

Methods inherited from Task

#arguments_for_ruby_execution, #step_files

Constructor Details

#initialize(task_name = "feature", desc = "Run a specified feature with Cucumber. #{task_name}[feature_name]") ⇒ FeatureTask

Returns a new instance of FeatureTask.



120
121
122
# File 'lib/cucumber/rake/task.rb', line 120

def initialize(task_name = "feature", desc = "Run a specified feature with Cucumber.  #{task_name}[feature_name]")
  super(task_name, desc)
end

Instance Method Details

#define_taskObject

:nodoc:



124
125
126
127
128
129
# File 'lib/cucumber/rake/task.rb', line 124

def define_task # :nodoc:
  desc @desc
  task @task_name, :feature_name do |t, args|
    ruby(arguments_for_ruby_execution(args).join(" ")) # ruby(*args) is broken on Windows
  end
end

#feature_files(task_arguments) ⇒ Object

:nodoc:



131
132
133
# File 'lib/cucumber/rake/task.rb', line 131

def feature_files(task_arguments) # :nodoc:
  FileList[File.join("features", "**", "#{task_arguments[:feature_name]}.feature")]
end