Sha256: 9d4cb4a76c0f4f18ea818c310ce36e4fa595bea9ae35ab4c0f3e6c414ee380dc
Contents?: true
Size: 499 Bytes
Versions: 24
Compression:
Stored size: 499 Bytes
Contents
require_relative "../spec_helper" describe "early_hints plugin" do it "allows sending early hints to rack.early_hints" do queue = [] app(:early_hints) do |r| send_early_hints('Link'=>'</foo.js>; rel=preload; as=script') queue << 'OK' 'OK' end body.must_equal 'OK' queue.must_equal ['OK'] queue = [] body('rack.early_hints'=>proc{|h| queue << h}).must_equal 'OK' queue.must_equal [{'Link'=>'</foo.js>; rel=preload; as=script'}, 'OK'] end end
Version data entries
24 entries across 24 versions & 1 rubygems