Sha256: a7378d014e7203c7661645566db7f595fdf8f5972e8fd6302596f3a9af1132d8

Contents?: true

Size: 923 Bytes

Versions: 13

Compression:

Stored size: 923 Bytes

Contents

# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
require_relative 'helper'
require 'rack/lobster'
require 'yahns/rack'
class TestRack < Testcase
  ENV["N"].to_i > 1 and parallelize_me!

  def test_rack
    tmp = tmpfile(%W(config .ru))
    tmp.write "run Rack::Lobster.new\n"
    rapp = GTL.synchronize { Yahns::Rack.new(tmp.path) }
    assert_kind_of Rack::Lobster, GTL.synchronize { rapp.app_after_fork }
    defaults = rapp.app_defaults
    assert_kind_of Hash, defaults
    tmp.close!
  end

  def test_rack_preload
    tmp = tmpfile(%W(config .ru))
    tmp.write "run Rack::Lobster.new\n"
    rapp = GTL.synchronize { Yahns::Rack.new(tmp.path, preload: true) }
    assert_kind_of Rack::Lobster, rapp.instance_variable_get(:@app)
    defaults = rapp.app_defaults
    assert_kind_of Hash, defaults
    tmp.close!
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yahns-1.9.0 test/test_rack.rb
yahns-1.8.0 test/test_rack.rb
yahns-1.7.0 test/test_rack.rb
yahns-1.6.0 test/test_rack.rb
yahns-1.5.0 test/test_rack.rb
yahns-1.4.0 test/test_rack.rb
yahns-1.3.1 test/test_rack.rb
yahns-1.3.0 test/test_rack.rb
yahns-1.2.0 test/test_rack.rb
yahns-1.1.0 test/test_rack.rb
yahns-1.0.0 test/test_rack.rb
yahns-0.0.3 test/test_rack.rb
yahns-0.0.2 test/test_rack.rb