Sha256: 1ad49d12d88114b9e4cb89d83b8f294308239205c529e24ecdf36b9fb8106f6c
Contents?: true
Size: 1.07 KB
Versions: 10
Compression:
Stored size: 1.07 KB
Contents
require File.join(File.dirname(__FILE__), '../../lib/generators/cucumber/feature/named_arg') require File.join(File.dirname(__FILE__), '../../lib/generators/cucumber/feature/feature_base') # This generator generates a baic feature. class FeatureGenerator < Rails::Generator::NamedBase include Cucumber::Generators::FeatureBase def manifest record do |m| create_directory(m, true) create_feature_file(m) create_steps_file(m) create_support_file(m) end end def self.gem_root File.expand_path('../../../', __FILE__) end def self.source_root File.join(gem_root, 'templates', 'feature') end def source_root self.class.source_root end def named_args args.map { |arg| NamedArg.new(arg) } end private def banner "Usage: #{$0} feature ModelName [field:type, field:type]" end def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on('--capybara=BACKEND', 'Generate a feature that uses a particular Capybara backend') do |backend| options[:capybara] = backend end end end
Version data entries
10 entries across 10 versions & 3 rubygems