Sha256: a84b972f765fbefd6851aced15fcf4a8c2b755c431e33cc1fd94ad0dac3c60be

Contents?: true

Size: 781 Bytes

Versions: 10

Compression:

Stored size: 781 Bytes

Contents

module Cucumber
  module Generators
    module FeatureBase

      def create_directory(m = self, rails2 = false)
        if rails2
          m.directory 'features/step_definitions'
        else
          m.empty_directory 'features/step_definitions'
        end
      end

      def create_feature_file(m = self)
        m.template 'feature.erb', "features/manage_#{plural_name}.feature"
      end

      def create_steps_file(m = self)
        m.template 'steps.erb', "features/step_definitions/#{singular_name}_steps.rb"
      end

      def create_support_file(m = self)
        m.gsub_file 'features/support/paths.rb', /'\/'/mi do |match|
          "#{match}\n    when /the new #{singular_name} page/\n      new_#{singular_name}_path\n"
        end
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
cucumber-rails2-0.3.5 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails2-0.3.4 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails2-0.3.3 lib/generators/cucumber/feature/feature_base.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/cucumber-rails-0.3.2/lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.4.1 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.4.0 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.4.0.beta.1 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.3.2 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.3.1 lib/generators/cucumber/feature/feature_base.rb
cucumber-rails-0.3.0 lib/generators/cucumber/feature/feature_base.rb