Sha256: a28a9f4bf01e880bea6dde82e07a6333ae73aa7265b2d712832d1e1d86cb9f81

Contents?: true

Size: 784 Bytes

Versions: 18

Compression:

Stored size: 784 Bytes

Contents

require 'test_helper'
require 'lib/generators/slim/testing_helper'

class Slim::Generators::MailerGeneratorTest < Rails::Generators::TestCase
  destination File.join(Rails.root)
  tests Rails::Generators::MailerGenerator
  arguments %w(notifier foo bar --template-engine slim)

  setup :prepare_destination
  setup :copy_routes

  test "should invoke template engine" do
    run_generator
    assert_file File.join "app", "views", "notifier", "foo.text.slim" do |view|
      assert_match %r(app/views/notifier/foo\.text\.slim), view
      assert_match /\= @greeting/, view
    end

    assert_file File.join "app", "views", "notifier", "bar.text.slim" do |view|
      assert_match %r(app/views/notifier/bar\.text\.slim), view
      assert_match /\= @greeting/, view
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
slim-rails-3.0.1 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-3.0.0 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.5 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.4 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.3 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.2 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.1 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.1.0 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.0.4 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.0.3 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.0.2 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-2.0.1 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.1.1 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.1.0 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.0.3 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.0.2 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.0.1 test/lib/generators/slim/mailer_generator_test.rb
slim-rails-1.0.0 test/lib/generators/slim/mailer_generator_test.rb