File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,17 @@ class ComponentGeneratorTest < Rails::Generators::TestCase
77 setup :prepare_destination
88
99 test "Assert all files are properly created" do
10+ # reset engines
11+ Rails . application . config . app_generators . template_engine nil
12+ Rails . application . config . app_generators . stylesheet_engine nil
13+ Rails . application . config . app_generators . javascript_engine nil
14+
1015 run_generator %w( widget )
1116
1217 assert_file "app/components/widget/_widget.html.erb"
1318 assert_file "app/components/widget/widget.css"
1419 assert_file "app/components/widget/widget.js"
1520 assert_file "app/components/widget/widget.yml"
16- # Delete generated files so the test don't fail if the order is random
17- FileUtils . remove_dir ( File . expand_path ( "../../tmp" , __FILE__ ) )
1821 end
1922
2023 test "Generates different engines" do
@@ -28,7 +31,5 @@ class ComponentGeneratorTest < Rails::Generators::TestCase
2831 assert_file "app/components/widget/widget.scss"
2932 assert_file "app/components/widget/widget.coffee"
3033 assert_file "app/components/widget/widget.yml"
31- # Delete generated files so the test don't fail if the order is random
32- FileUtils . remove_dir ( File . expand_path ( "../../tmp" , __FILE__ ) )
3334 end
3435end
You can’t perform that action at this time.
0 commit comments