Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmoss committed Oct 30, 2024
1 parent 5dab2c8 commit a9e2d71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
8 changes: 5 additions & 3 deletions bin/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env ruby
$: << File.expand_path("../test", __dir__)
# frozen_string_literal: true

require "bundler/setup"
require "rails/plugin/test"
$LOAD_PATH << File.expand_path('../test', __dir__)

require 'bundler/setup'
require 'rails/plugin/test'
16 changes: 4 additions & 12 deletions test/phlex/react_component_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ class Proscenium::Phlex::ReactComponentTest < ActiveSupport::TestCase
}, Proscenium::Importer.imported['/@proscenium/react-manager/index.jsx'])
end

# describe ':loader' do
# it 'show loader until component loads' do
# render Phlex::BasicReactComponent.new(loader: true)

# pp page.native.to_html

# expect(Proscenium::Importer.imported['/app/components/phlex/basic_react_component.jsx'][:lazy]).to be == true
# end
# end

describe 'lazy loading' do
after do
Phlex::BasicReactComponent.lazy = false # reset
Expand Down Expand Up @@ -149,7 +139,8 @@ class Proscenium::Phlex::ReactComponentTest < ActiveSupport::TestCase
end

let(:selector) do
'[data-proscenium-component-path="/app/components/phlex/react/forward_children/component.jsx"]'
'[data-proscenium-component-path="' \
'/app/components/phlex/react/forward_children/component.jsx"]'
end

it 'adds forward-children data attribute' do
Expand Down Expand Up @@ -185,7 +176,8 @@ class Proscenium::Phlex::ReactComponentTest < ActiveSupport::TestCase
end

let(:selector) do
'[data-proscenium-component-path="/app/components/phlex/react/forward_children/component.jsx"]'
'[data-proscenium-component-path="' \
'/app/components/phlex/react/forward_children/component.jsx"]'
end

it 'does not adds forward-children data attribute' do
Expand Down
2 changes: 1 addition & 1 deletion test/version_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'test_helper'

class Proscenium::VersionTest < ActiveSupport::TestCase
it 'has a version number' do # rubocop:disable Minitest/EmptyLineBeforeAssertionMethods
it 'has a version number' do
assert_not_nil Proscenium::VERSION
end
end

0 comments on commit a9e2d71

Please sign in to comment.