Sha256: 249f92ebb7efec165a73fb0ed0c062ae3f81f2f56a95280efa161215ab8b1a87

Contents?: true

Size: 937 Bytes

Versions: 13

Compression:

Stored size: 937 Bytes

Contents

# Copyright (C) 2013-2016 all contributors <yahns-public@yhbt.net>
# License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
# frozen_string_literal: true
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.18.0 test/test_rack.rb
yahns-1.17.0 test/test_rack.rb
yahns-1.16.0 test/test_rack.rb
yahns-1.15.0 test/test_rack.rb
yahns-1.14.1 test/test_rack.rb
yahns-1.14.0 test/test_rack.rb
yahns-1.13.0 test/test_rack.rb
yahns-1.12.5 test/test_rack.rb
yahns-1.12.4 test/test_rack.rb
yahns-1.12.3 test/test_rack.rb
yahns-1.12.2 test/test_rack.rb
yahns-1.12.1 test/test_rack.rb
yahns-1.12.0 test/test_rack.rb