Sha256: 9dd1f739bd29284f7c54516ec1565e3c5da5ddc64e19bc1648bbb8372024b88e
Contents?: true
Size: 448 Bytes
Versions: 11
Compression:
Stored size: 448 Bytes
Contents
require 'fake_sqs/show_output' 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" => ""} app.should_receive(:call).with(env).and_return([200, {}, ["<xml>"]]) middleware.call(env) $stdout.rewind $stdout.read.should eq "--- {}\n\n<xml>\n" end end
Version data entries
11 entries across 11 versions & 1 rubygems