Sha256: c51c654016a481d81064d8a5491bab53476256535ef50119421287b8137b4407

Contents?: true

Size: 383 Bytes

Versions: 23

Compression:

Stored size: 383 Bytes

Contents

require 'generators/rspec'

module Rspec
  module Generators
    # @private
    class HelperGenerator < Base
      class_option :helper_specs, type: :boolean, default: true

      def generate_helper_spec
        return unless options[:helper_specs]

        template 'helper_spec.rb', File.join('spec/helpers', class_path, "#{file_name}_helper_spec.rb")
      end
    end
  end
end

Version data entries

23 entries across 21 versions & 4 rubygems

Version Path
rspec-rails-4.0.0 lib/generators/rspec/helper/helper_generator.rb
rspec-rails-4.0.0.rc1 lib/generators/rspec/helper/helper_generator.rb
rspec-rails-4.0.0.beta4 lib/generators/rspec/helper/helper_generator.rb