Sha256: a49077f2b1362d521c9a3ab98c170b13f32c7fbd45f0107a5ad549c5b909d718
Contents?: true
Size: 695 Bytes
Versions: 33
Compression:
Stored size: 695 Bytes
Contents
require "hanami_helper" RSpec.describe <%= configuration.project_namespaced_class %>::Refines::Actions::Response do using described_class subject(:response) { Hanami::Action::Response.new request:, config: {} } let :request do Rack::MockRequest.env_for("/").then { |env| Hanami::Action::Request.new env:, params: {} } end describe "#with" do it "answers response with given body and status" do expect(response.with(body: "Danger!", status: 400)).to have_attributes( body: ["Danger!"], status: 400 ) end it "answers itself" do expect(response.with(body: "Danger!", status: 400)).to be_a(Hanami::Action::Response) end end end
Version data entries
33 entries across 33 versions & 1 rubygems