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

Fix spec warnings #650

Merged
merged 3 commits into from
Jan 4, 2025
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
10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ Layout/TrailingWhitespace:
Layout/TrailingEmptyLines:
Enabled: true

Lint/AmbiguousOperator:
Enabled: true

Lint/AmbiguousRegexpLiteral:
Enabled: true

Lint/UselessAssignment:
Enabled: true

Packaging/BundlerSetupInTests:
Enabled: true

Expand Down Expand Up @@ -584,6 +593,7 @@ Style/FrozenStringLiteralComment:
Enabled: true
Exclude:
- bin/console
- '**/*.arb'

Style/HashSyntax:
Enabled: true
2 changes: 1 addition & 1 deletion spec/arbre/unit/component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def build
end

it "renders the object using the builder method name" do
comp = expect(arbre {
expect(arbre {
mock_component
}.to_s).to eq <<~HTML
<div>
Expand Down
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/_partial.arb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# frozen_string_literal: true
para "Hello from a partial"
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/_partial_with_assignment.arb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# frozen_string_literal: true
para "Partial: #{my_instance_var}"
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
h1 "Before Partial"
render "arbre/partial_with_assignment"
h2 "After Partial"
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/page_with_assignment.arb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# frozen_string_literal: true
h1 my_instance_var
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/page_with_erb_partial.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
h1 "Before Partial"
render "erb/partial"
h2 "After Partial"
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/page_with_partial.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
h1 "Before Partial"
render "arbre/partial"
h2 "After Partial"
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/page_with_render_with_block.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
render_in_object = Class.new do
def render_in(_, &block)
block.call
Expand Down
1 change: 0 additions & 1 deletion spec/rails/templates/arbre/simple_page.arb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# frozen_string_literal: true
html do
head do
end
Expand Down
Loading