Sha256: 0be3ca13d83a6c8508eccfd2e0dd59ba83306a762117c69d0cb22602c8b8523c
Contents?: true
Size: 462 Bytes
Versions: 8
Compression:
Stored size: 462 Bytes
Contents
require 'fake_sqs/show_output' RSpec.describe FakeSQS::ShowOutput do after do $stdout = STDOUT end it "outputs the result of rack app" do app = double :app $stdout = StringIO.new middleware = FakeSQS::ShowOutput.new(app) env = {"rack.input" => ""} expect(app).to receive(:call).with(env).and_return([200, {}, ["<xml>"]]) middleware.call(env) $stdout.rewind expect($stdout.read).to eq "--- {}\n\n<xml>\n" end end
Version data entries
8 entries across 8 versions & 2 rubygems