Skip to content

Commit f30e99f

Browse files
committed
Handle RuboCop constant name but rubocop file name
1 parent 978f837 commit f30e99f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

spec/tapioca/dsl/compilers/rubo_cop_spec.rb renamed to spec/tapioca/dsl/compilers/rubocop_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ class RuboCopSpec < ::DslSpec
1313
.descendants_of(::RuboCop::Cop::Base)
1414
.filter_map { |constant| Runtime::Reflection.name_of(constant) }
1515

16+
class << self
17+
def target_class_file
18+
# Against convention, RuboCop uses "rubocop" in its file names, so we do too.
19+
super.gsub("rubo_cop", "rubocop")
20+
end
21+
end
22+
1623
describe "Tapioca::Dsl::Compilers::RuboCop" do
1724
sig { void }
1825
def before_setup
19-
require "tapioca/dsl/extensions/rubo_cop"
26+
require "tapioca/dsl/extensions/rubocop"
2027
super
2128
end
2229

0 commit comments

Comments
 (0)