class InertiaRails::RSpec::InertiaRenderWrapper
Attributes
component[R]
props[R]
view_data[R]
Public Class Methods
new()
click to toggle source
# File lib/inertia_rails/rspec.rb, line 9 def initialize @view_data = nil @props = nil @component = nil end
Public Instance Methods
call(params)
click to toggle source
# File lib/inertia_rails/rspec.rb, line 15 def call(params) set_values(params) @render_method&.call(params) end
wrap_render(render_method)
click to toggle source
# File lib/inertia_rails/rspec.rb, line 20 def wrap_render(render_method) @render_method = render_method self end
Protected Instance Methods
set_values(params)
click to toggle source
# File lib/inertia_rails/rspec.rb, line 27 def set_values(params) @view_data = params[:locals].except(:page) @props = params[:locals][:page][:props] @component = params[:locals][:page][:component] end