Sha256: 83366b625c35900945b1d6b432f78fb79767795e29303c87c68cd81102383ce5

Contents?: true

Size: 1.04 KB

Versions: 79

Compression:

Stored size: 1.04 KB

Contents

# -*- encoding : utf-8 -*-
require 'rails/generators'
require 'rails/generators/migration'     

module Hydra
class CucumberSupportGenerator < Rails::Generators::Base
  
  source_root File.expand_path('../../../../test_support/features', __FILE__)
  
  argument :features_dir, :type => :string , :default => "features"
        
  desc """
  This Generator copies Hydra's cucumber step definitions and paths into your application's features directory.
  We have plans to provide the step definitions directly through the hydra-head gem without requiring this step of copying the files.
  In the meantime, you need to copy the files in order to use them. 
  
  Defaults to assuming that your cucumber features live in a directory called \"features\".  To pass in an alternative path to your features directory,
  
  rails generate hydra:cucumber_support test_support/features
  
  """
  
  def copy_cucumber_support
    directory("step_definitions", "#{features_dir}/step_definitions")
    copy_file("support/paths.rb", "#{features_dir}/support/paths.rb")
  end
  
end
end

Version data entries

79 entries across 79 versions & 2 rubygems

Version Path
hydra-head-3.1.4 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.3 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.2 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.1 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.rc2 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.rc1 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.pre5 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.pre4 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.pre3 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.1 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.pre2 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.1.0.pre1 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0.rc2 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0.rc1 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0pre4 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0pre3 lib/generators/hydra/cucumber_support_generator.rb
hydra-head-3.0.0pre2 lib/generators/hydra/cucumber_support_generator.rb