File tree Expand file tree Collapse file tree 3 files changed +4
-22
lines changed
test/lib/generators/tailwindcss Expand file tree Collapse file tree 3 files changed +4
-22
lines changed Original file line number Diff line number Diff line change 22require "generators/tailwindcss/controller/controller_generator"
33
44class Tailwindcss ::Generators ::ControllerGeneratorTest < Rails ::Generators ::TestCase
5- GENERATION_PATH = File . expand_path ( "../controller_tmp" , File . dirname ( __FILE__ ) )
6-
75 tests Tailwindcss ::Generators ::ControllerGenerator
8- destination GENERATION_PATH
6+ destination Dir . mktmpdir
97
108 arguments %w( Messages index show )
119
12- Minitest . after_run do
13- FileUtils . rm_rf GENERATION_PATH
14- end
15-
1610 test "generates correct view templates" do
1711 run_generator
1812 assert_file "app/views/messages/index.html.erb"
Original file line number Diff line number Diff line change 33require "generators/tailwindcss/mailer/mailer_generator"
44
55class Tailwindcss ::Generators ::MailerGeneratorTest < Rails ::Generators ::TestCase
6- GENERATION_PATH = File . expand_path ( "../mailer_tmp" , File . dirname ( __FILE__ ) )
7-
86 tests Rails ::Generators ::MailerGenerator
9- destination GENERATION_PATH
7+ destination Dir . mktmpdir
108
119 arguments %w( Notifications invoice )
1210
13- Minitest . after_run do
14- FileUtils . rm_rf GENERATION_PATH
15- end
16-
1711 test "generates correct mailer view templates" do
1812 run_generator
1913
Original file line number Diff line number Diff line change 22require "generators/tailwindcss/scaffold/scaffold_generator"
33
44class Tailwindcss ::Generators ::ScaffoldGeneratorTest < Rails ::Generators ::TestCase
5- GENERATION_PATH = File . expand_path ( "../scaffold_tmp" , File . dirname ( __FILE__ ) )
6-
75 tests Tailwindcss ::Generators ::ScaffoldGenerator
8- destination GENERATION_PATH
6+ destination Dir . mktmpdir
97
108 arguments %w( message title:string content:text )
119
12- Minitest . after_run do
13- FileUtils . rm_rf GENERATION_PATH
14- end
15-
1610 test "generates correct view templates" do
1711 run_generator
1812
1913 %w( index edit new show _form _message ) . each { |view | assert_file "app/views/messages/#{ view } .html.erb" }
2014 end
21- end
15+ end
You can’t perform that action at this time.
0 commit comments