Sha256: 18909e6f53f4a92bfc0d91f4b83128662b6885100e51691c7243b3f1566e6080
Contents?: true
Size: 850 Bytes
Versions: 53
Compression:
Stored size: 850 Bytes
Contents
require 'spec_helper' describe "getting rack response directly" do before(:each) do @app = test_app.configure do |c| c.generator.add :test do "bunheads" end end end it "should give a rack response" do response = @app.generate(:test, 1, 1).to_response response.should be_a(Array) response.length.should == 3 response[0].should == 200 response[1]['Content-Type'].should == 'application/octet-stream' response[2].data.should == 'bunheads' end it "should allow passing in the env" do response = @app.generate(:test, 1, 1).to_response('REQUEST_METHOD' => 'POST') response.should be_a(Array) response.length.should == 3 response[0].should == 405 response[1]['Content-Type'].should == 'text/plain' response[2].should == ["POST method not allowed"] end end
Version data entries
53 entries across 53 versions & 2 rubygems