Sha256: 185ebf2ed5d1b87a314afb9a105ea6e8250ea7f211f226e8861531b578f645f3

Contents?: true

Size: 570 Bytes

Versions: 16

Compression:

Stored size: 570 Bytes

Contents

require 'generators/rspec'

module Rspec
  module Generators
    class MailerGenerator < Base
      argument :actions, :type => :array, :default => [], :banner => "method method"

      def create_mailer_files
        template "mailer_spec.rb",
                 File.join('spec', 'models', class_path, "#{file_name}_spec.rb")
      end

      def create_fixtures_files
        actions.each do |action|
          @action, @path = action, File.join(file_path, action)
          template "fixture", File.join("spec/fixtures", @path)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
rails3-generators-0.5.2 lib/replaced_by_lib_generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.5.1 lib/replaced_by_lib_generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.5.0 lib/replaced_by_lib_generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a8 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a7 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a6 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a5 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a4 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a3 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.a2 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.3.3 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.3.2 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.3.1 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.3.0 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.2.0 lib/generators/rspec/mailer/mailer_generator.rb
rails3-generators-0.1.0 lib/generators/rspec/mailer/mailer_generator.rb