module SpecViews::Support::SpecViewExample

Public Instance Methods

render(description = nil, focus: nil, pending: nil, status: :ok, &block) click to toggle source
# File lib/spec_views/support.rb, line 152
def render(description = nil, focus: nil, pending: nil, status: :ok, &block)
  context do # rubocop:disable RSpec/MissingExampleGroupArgument
    render_views
    options = {}
    options[:focus] = focus unless focus.nil?
    options[:pending] = pending unless pending.nil?
    it(description, options) do
      instance_eval(&block)
      spec_view.write_last_run
      write = status.in?(
        [
          response.message.parameterize.underscore.to_sym,
          response.status,
        ],
      )
      spec_view.write_challenger if write
      spec_view.expect_eq
    end
  end
end