Sha256: 92da58ca1176c4a2e25fff68db0357c25cfc35e3477e856687d05f97099bf324
Contents?: true
Size: 649 Bytes
Versions: 19
Compression:
Stored size: 649 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) 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_equal 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
19 entries across 19 versions & 1 rubygems