Skip to content

Commit bc992a5

Browse files
scott-knightdixpac
authored andcommitted
Add revoke tests for the controller generator
1 parent 7f65083 commit bc992a5

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/lib/generators/tailwindcss/controller_generator_test.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ class Tailwindcss::Generators::ControllerGeneratorTest < Rails::Generators::Test
99

1010
arguments %w(Messages index show)
1111

12-
Minitest.after_run do
13-
FileUtils.rm_rf GENERATION_PATH
14-
end
12+
Minitest.after_run do
13+
FileUtils.rm_rf GENERATION_PATH
14+
end
1515

1616
test "generates correct view templates" do
1717
run_generator
1818
assert_file "app/views/messages/index.html.erb"
1919
assert_file "app/views/messages/show.html.erb"
2020
end
21-
end
2221

22+
test "should revoke the template engine" do
23+
run_generator
24+
run_generator ["messages"], behavior: :revoke
25+
26+
assert_no_file "app/views/messages"
27+
assert_no_file "app/views/messages/index.html.erb"
28+
assert_no_file "app/views/messages/show.html.erb"
29+
end
30+
end

0 commit comments

Comments
 (0)