Class: Shoe::Tasks::Cucumber

Inherits:
Task
  • Object
show all
Defined in:
lib/shoe/tasks/cucumber.rb

Overview

Defines `rake cucumber` and `rake cucumber:<PROFILE>` to run your Cucumber features.

`rake cucumber` will run features according to the default profile; `rake cucumber:foo` according to the foo profile.

To enable and configure, create and edit your {cucumber.yml}[http://wiki.github.com/aslakhellesoy/cucumber/cucumberyml].

Instance Attribute Summary

Attributes inherited from Task

#spec

Instance Method Summary collapse

Methods inherited from Task

#initialize

Constructor Details

This class inherits a constructor from Shoe::Tasks::Task

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/shoe/tasks/cucumber.rb', line 16

def active?
  !cucumber_profiles.empty?
end

#defineObject



20
21
22
23
24
25
26
27
28
# File 'lib/shoe/tasks/cucumber.rb', line 20

def define
  begin
    require 'cucumber/rake/task'
  rescue LoadError
    warn "WARN: Please `gem install cucumber`."
  else
    define_tasks
  end
end