Sha256: d2138c98e2f29bf691af390779d4eb11f3bf0c0f5a33b819b2837492c55391a3

Contents?: true

Size: 554 Bytes

Versions: 59

Compression:

Stored size: 554 Bytes

Contents

require 'generators/rspec'

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

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

      def generate_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

59 entries across 54 versions & 5 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.99.0 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-3.0.0.rc1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.99.0.rc1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.14.2 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-3.0.0.beta2 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.99.0.beta2 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.14.1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-3.0.0.beta1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.99.0.beta1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.14.0 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.14.0.rc1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.13.2 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.13.1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.13.0 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.12.2 lib/generators/rspec/mailer/mailer_generator.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.12.1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.12.0 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.11.4 lib/generators/rspec/mailer/mailer_generator.rb