compat/streaming_test.rb in bmizerany-sinatra-0.9.0.5 vs compat/streaming_test.rb in bmizerany-sinatra-0.9.1
- old
+ new
@@ -91,11 +91,11 @@
setup do
Sinatra.application = nil
end
# Deprecated. send_data is going away.
- xspecify "should send the data with options" do
+ specify "should send the data with options" do
get '/' do
send_data 'asdf', :status => 500
end
get_it '/'
@@ -103,20 +103,20 @@
should.be.server_error
body.should.equal 'asdf'
end
# Deprecated. The Content-Disposition is no longer handled by sendfile.
- xspecify "should include a Content-Disposition header" do
+ specify "should include a Content-Disposition header" do
get '/' do
- send_file File.dirname(__FILE__) + '/public/foo.xml'
+ send_file File.dirname(__FILE__) + '/public/foo.xml',
+ :disposition => 'attachment'
end
get_it '/'
should.be.ok
headers['Content-Disposition'].should.not.be.nil
headers['Content-Disposition'].should.equal 'attachment; filename="foo.xml"'
- headers['Content-Transfer-Encoding'].should.equal 'binary'
end
specify "should include a Content-Disposition header when :disposition set to attachment" do
get '/' do
send_file File.dirname(__FILE__) + '/public/foo.xml',