Sha256: 36f773eb5783ca537bcffdf42369e92a18bcdc3cab9b70963a41654ae6b47a04

Contents?: true

Size: 721 Bytes

Versions: 22

Compression:

Stored size: 721 Bytes

Contents

require 'test_helper'

class SimpleForm::Generators::FormBuilderGeneratorTest < Rails::Generators::TestCase
  destination File.join(Rails.root)
  tests Rails::Generators::ScaffoldGenerator

  setup :prepare_destination
  setup :copy_routes

  test "should invoke form builder and output haml form" do
    run_generator %w(product_line title:string price:integer --template-engine haml --form-builder simple_form)
    assert_file "app/views/product_lines/_form.html.haml"
  end

  test "should invoke form builder and output erubis form" do
    run_generator %w(product_line title:string price:integer --template-engine erubis --form-builder simple_form)
    assert_file "app/views/product_lines/_form.html.erb"
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rails3-generators-0.17.6 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.5 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.4 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.3 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.2 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.1 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.17.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.16.1 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.16.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.15.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.14.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.13.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.12.1 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.12.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.11.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.10.3 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.10.2 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.10.1 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.10.0 test/lib/generators/simple_form/scaffold_generators_test.rb
rails3-generators-0.9.2 test/lib/generators/simple_form/scaffold_generators_test.rb