Sha256: 982a5a3d544fd33f5750c137eb8891b3c6efcb4165fdba197aa567dc469bb155
Contents?: true
Size: 602 Bytes
Versions: 20
Compression:
Stored size: 602 Bytes
Contents
require_relative "../spec_helper" describe "delay_build plugin" do it "does not build rack app until app is called" do app(:delay_build){"a"} app.instance_variable_get(:@app).must_be_nil body.must_equal "a" # Work around minitest bug refute_equal app.instance_variable_get(:@app), nil end it "only rebuilds the app if build! is called" do app(:delay_build){"a"} body.must_equal "a" c = Class.new do def initialize(_) end def call(_) [200, {}, ["b"]] end end app.use c body.must_equal "a" app.build! body.must_equal "b" end end
Version data entries
20 entries across 20 versions & 1 rubygems