Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leogalmeida committed Jun 3, 2013
1 parent 8b68cbf commit 5a27e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/lib/generators/slim/controller_generator_test.rb
Expand Up @@ -11,7 +11,7 @@ class Slim::Generators::ControllerGeneratorTest < Rails::Generators::TestCase


test "should invoke template engine" do test "should invoke template engine" do
run_generator run_generator
assert_file File.join "app", "views", "account", "foo.html.slim", %r(app/views/account/foo\.html\.slim) assert_file File.join("app", "views", "account", "foo.html.slim"), %r(app/views/account/foo\.html\.slim)
assert_file File.join "app", "views", "account", "bar.html.slim", %r(app/views/account/bar\.html\.slim) assert_file File.join("app", "views", "account", "bar.html.slim"), %r(app/views/account/bar\.html\.slim)
end end
end end
9 changes: 2 additions & 7 deletions test/lib/generators/slim/scaffold_generator_test.rb
Expand Up @@ -4,7 +4,7 @@
class Slim::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase class Slim::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase
destination File.join(Rails.root) destination File.join(Rails.root)
tests Rails::Generators::ScaffoldGenerator tests Rails::Generators::ScaffoldGenerator
arguments %w(product_line title:string price:integer --template-engine slim) arguments %w(product_line title:string price:integer --template-engine slim --orm active-record)


setup :prepare_destination setup :prepare_destination
setup :copy_routes setup :copy_routes
Expand All @@ -18,14 +18,9 @@ class Slim::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase


test "should revoke template engine" do test "should revoke template engine" do
run_generator run_generator
run_generator ["product_line"], :behavior => :revoke run_generator ["product_line", "--orm", "active-record"], :behavior => :revoke


assert_no_file File.join "app", "views", "product_lines" assert_no_file File.join "app", "views", "product_lines"
assert_no_file File.join "app", "views", "layouts", "product_lines.html.slim" assert_no_file File.join "app", "views", "layouts", "product_lines.html.slim"
end end

test "should invoke form builder" do
run_generator %w(product_line title:string price:integer --template-engine slim --form-builder some-form-builder)
assert_no_file File.join "app", "views", "product_lines", "_form.html.slim"
end
end end

0 comments on commit 5a27e95

Please sign in to comment.