Class: Shoe::Tasks::Cucumber

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

Overview

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

rake cucumber</tt> will run features according to the default profile; rake cucumber:foo</tt> according to the foo profile.

To enable and configure, create and edit your cucumber.yml.

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