Class: Cukestart::Generator::Feature

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/cukestart/generator/feature.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



9
10
11
# File 'lib/cukestart/generator/feature.rb', line 9

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_featureObject



19
20
21
# File 'lib/cukestart/generator/feature.rb', line 19

def create_feature
  template('templates/feature.tt', "features/#{feature_name}.feature")
end

#is_cucumber_projectObject



13
14
15
16
17
# File 'lib/cukestart/generator/feature.rb', line 13

def is_cucumber_project
  if !Dir.exist?("features") or !File.exist?("features/support/env.rb")
    abort("It's not the root of a cucumber project!")
  end
end