From 9ee15313ede8a0c56fdf614551967d379cd0fb96 Mon Sep 17 00:00:00 2001 From: Chris Welham <71787007+apexatoll@users.noreply.github.com> Date: Wed, 8 Nov 2023 09:19:26 +0000 Subject: [PATCH] Make RequestHelper#view_path public --- lib/kangaru/initialisers/rspec/request_helper.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/kangaru/initialisers/rspec/request_helper.rb b/lib/kangaru/initialisers/rspec/request_helper.rb index fe8b45c..7559f88 100644 --- a/lib/kangaru/initialisers/rspec/request_helper.rb +++ b/lib/kangaru/initialisers/rspec/request_helper.rb @@ -24,6 +24,10 @@ def resolve(path, params:) Kangaru.application.router.resolve(request) end + def view_path(name) + Kangaru.application!.view_path(described_class.path, name.to_s) + end + matcher :render_template do |name| supports_block_expectations @@ -44,12 +48,6 @@ def resolve(path, params:) .once end end - - private - - def view_path(name) - Kangaru.application!.view_path(described_class.path, name.to_s) - end end if Object.const_defined?(:RSpec)