Sha256: 89fcfa1589f30999fda0bccc96cc124135747321337d687cddd690d3edc3e521

Contents?: true

Size: 549 Bytes

Versions: 26

Compression:

Stored size: 549 Bytes

Contents

require 'generators/rspec'

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

      def create_spec_files
        template "mailer_spec.rb", File.join('spec/mailers', 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

26 entries across 26 versions & 1 rubygems

Version Path
rspec-rails-2.0.0 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.rc lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.22 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.20 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.19 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.18 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.17 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.16 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.15 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.14.2 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.14.1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.13 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.12 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.11 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.10 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.9.1 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.8 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.7 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.6 lib/generators/rspec/mailer/mailer_generator.rb
rspec-rails-2.0.0.beta.5 lib/generators/rspec/mailer/mailer_generator.rb