Skip to content

Commit

Permalink
Match constant definition with the file name
Browse files Browse the repository at this point in the history
Although parser_selection is why those methods exists, they all exist
in Rails::Dom::Testing module. Following Rails convetions, it is better
to define the name of the file matching the name of the constant.
  • Loading branch information
rafaelfranca committed Aug 3, 2023
1 parent 1ef961f commit f6c1650
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions lib/rails-dom-testing.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# frozen_string_literal: true


require "rails/dom/testing"
require "rails/dom/testing/railtie" if defined?(Rails::Railtie)
require "rails/dom/testing/assertions"
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# frozen_string_literal: true


require "nokogiri"
require "active_support"
require "active_support/core_ext/module/attribute_accessors"

require "rails/dom/testing/assertions"

module Rails
module Dom
module Testing
Expand Down
3 changes: 0 additions & 3 deletions lib/rails/dom/testing/assertions.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# frozen_string_literal: true

require "nokogiri"
require "active_support"

require_relative "assertions/dom_assertions"
require_relative "assertions/selector_assertions"

Expand Down
2 changes: 0 additions & 2 deletions lib/rails/dom/testing/assertions/dom_assertions.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require_relative "../parser_selection"

module Rails
module Dom
module Testing
Expand Down
1 change: 0 additions & 1 deletion lib/rails/dom/testing/assertions/selector_assertions.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require_relative "../parser_selection"
require_relative "selector_assertions/html_selector"

module Rails
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "minitest"
require "active_support/core_ext/module/attribute_accessors"

require_relative "substitution_context"

Expand Down

0 comments on commit f6c1650

Please sign in to comment.