File: controller_generator_test.rb

package info (click to toggle)
ruby-haml-rails 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 228 kB
  • sloc: ruby: 281; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 570 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'test_helper'
require 'rails/generators/rails/controller/controller_generator'
require 'generators/haml/controller/controller_generator'

class Haml::Generators::ControllerGeneratorTest < Rails::Generators::TestCase
  destination Rails.root
  tests Rails::Generators::ControllerGenerator

  setup :prepare_destination
  setup :copy_routes

  arguments %w(Account foo bar --template-engine haml)

  test "should invoke haml engine" do
    run_generator
    assert_file "app/views/account/foo.html.haml"
    assert_file "app/views/account/bar.html.haml"
  end
end