diff --git a/config/routes.rb b/config/routes.rb index 74ebc5b0..d331abbd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -171,5 +171,11 @@ Rails.application.routes.draw do get "/nodeinfo/2.1", to: "well_known/node_info#nodeinfo", as: :node_info + if Rails.env.test? + get "turbo_streamable" => "turbo_streamable_test#create" + get "turbo_streamable_blocked" => "turbo_streamable_test#blocked" + get "turbo_streamable_not_found" => "turbo_streamable_test#not_found" + end + puts "processing time of routes.rb: #{"#{(Time.zone.now - start).round(3).to_s.ljust(5, '0')}s".light_green}" end diff --git a/spec/controllers/concerns/turbo_streamable_spec.rb b/spec/controllers/concerns/turbo_streamable_spec.rb index fc285d30..6c1facdf 100644 --- a/spec/controllers/concerns/turbo_streamable_spec.rb +++ b/spec/controllers/concerns/turbo_streamable_spec.rb @@ -29,16 +29,6 @@ end describe TurboStreamableTestController, type: :controller do render_views - before do - routes.disable_clear_and_finalize = true - routes.draw do - get "turbo_streamable" => "turbo_streamable_test#create" - get "turbo_streamable_blocked" => "turbo_streamable_test#blocked" - get "turbo_streamable_not_found" => "turbo_streamable_test#not_found" - end - routes.finalize! - end - shared_examples_for "it returns a toast as Turbo Stream response" do |action, message| subject { get action, format: :turbo_stream }