Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint Generator: Remove generated test/spec files #1167

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/generators/suspenders/lint_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ def configure_erb_lint
copy_file "config_initializers_better_html.rb", "config/initializers/better_html.rb"
copy_file "erblint.rake", "lib/tasks/erblint.rake"
template "rubocop.yml.tt", ".rubocop.yml"

if default_test_suite?
copy_file "better_html_test.rb", "test/views/better_html_test.rb"
elsif rspec_test_suite?
copy_file "better_html_spec.rb", "spec/views/better_html_spec.rb"
end
end

def update_package_json
Expand Down
17 changes: 0 additions & 17 deletions lib/generators/templates/lint/better_html_spec.rb

This file was deleted.

17 changes: 0 additions & 17 deletions lib/generators/templates/lint/better_html_test.rb

This file was deleted.

18 changes: 0 additions & 18 deletions test/generators/suspenders/lint_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,24 +220,6 @@ class LintGeneratorTest < Rails::Generators::TestCase
end
end

test "generates erb-lint tests" do
with_test_suite :minitest do
capture(:stderr) { run_generator }

assert_file app_root("test/views/better_html_test.rb")
assert_no_file app_root("spec/views/better_html_spec.rb")
end
end

test "generates erb-lint specs" do
with_test_suite :rspec do
capture(:stderr) { run_generator }

assert_file app_root("spec/views/better_html_spec.rb")
assert_no_file app_root("test/views/better_html_test.rb")
end
end

test "generates .rubocop.yml" do
expected_content = <<~YAML
AllCops:
Expand Down