Sha256: 8b294cf1cbdf46912678f25dd74fa2f8fc8cd6f6a35d77d8df4a9fefe30b3671
Contents?: true
Size: 422 Bytes
Versions: 40
Compression:
Stored size: 422 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Response, 'performance' do before do @response = Response.new @response.body = '' end it "should be fast" do @response.body << <<-EOS <html><head><title>Dir listing</title></head> <body><h1>Listing stuff</h1><ul> #{'<li>Hi!</li>' * 100} </ul></body></html> EOS proc { @response.each { |l| l } }.should be_faster_then(0.00011) end end
Version data entries
40 entries across 40 versions & 6 rubygems