Sha256: e176802d830533894b29ab77f7355fd858ef02392269247410a52a0203e20357

Contents?: true

Size: 819 Bytes

Versions: 1

Compression:

Stored size: 819 Bytes

Contents

require 'rails/generators/base'
require 'rails/generators/named_base'

module RSpec
  module Generators
    class Base < Rails::Generators::Base #:nodoc:
      def self.source_root
        @_rspec_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'rspec', generator_name, 'templates'))
      end

      def self.banner
        "#{$0} rspec:#{generator_name} #{self.arguments.map{ |a| a.usage }.join(' ')} [options]"
      end
    end

    class NamedBase < Rails::Generators::NamedBase #:nodoc:
      def self.source_root
        @_rspec_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'rspec', generator_name, 'templates'))
      end

      def self.banner
        "#{$0} rspec:#{generator_name} #{self.arguments.map{ |a| a.usage }.join(' ')} [options]"
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec_rails3_gen-0.2.0 lib/generators/rspec_rails3_gen_base.rb