Skip to content

Commit

Permalink
fis spcs
Browse files Browse the repository at this point in the history
  • Loading branch information
reeganviljoen committed Nov 19, 2024
1 parent c400744 commit a2b9c59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/sandbox/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie" if Rails.version.to_f <= 7.2 || !ENV["BENCHMARK"].present?
# require "propshaft/railtie" if Rails.version.to_f >= 7.2
require "sprockets/railtie" if Rails.version.to_f < 8.0 && !ENV["BENCHMARK"].present?
require "propshaft" if Rails.version.to_f >= 8.0

require "turbo-rails"

Expand Down
9 changes: 4 additions & 5 deletions test/sandbox/test/rendering_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ def test_renders_component_without_format

def test_renders_component_with_asset_url
component = AssetComponent.new
if Rails.version.to_f <= 7.2
assert_match(%r{http://assets.example.com/assets/application-\w+.css}, render_inline(component).text)
assert_match(%r{http://assets.example.com/assets/application-\w+.css}, render_inline(component).text)

if Rails.version.to_f < 8.0

# cant do this in Rails 8 https://github.com/rails/propshaft/pull/59
# Propshaft doesnt allow setting custom hosts so this only works in Rails < 8
component.config.asset_host = nil
assert_match(%r{/assets/application-\w+.css}, render_inline(component).text)

Expand All @@ -348,8 +349,6 @@ def test_renders_component_with_asset_url

component.config.asset_host = "assets.example.com"
assert_match(%r{http://assets.example.com/assets/application-\w+.css}, render_inline(component).text)
else
assert_match(%r{http://assets.example.com/application.css}, render_inline(component).text)
end
end

Expand Down

0 comments on commit a2b9c59

Please sign in to comment.