Sha256: c6bc5b382a3e9ff7b081b4f58a5848bf1c7d2e023a4398df1321a79e99908412
Contents?: true
Size: 629 Bytes
Versions: 16
Compression:
Stored size: 629 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) describe "pass plugin" do it "skips the current block if pass is called" do app(:pass) do |r| r.root do r.pass if env['FOO'] 'root' end r.on :id do |id| r.pass if id == 'foo' id end r.on ":x/:y" do |x, y| x + y end end body.should == 'root' status('FOO'=>true).should == 404 body("/a").should == 'a' body("/a/b").should == 'a' body("/foo/a").should == 'fooa' body("/foo/a/b").should == 'fooa' status("/foo").should == 404 end end
Version data entries
16 entries across 16 versions & 2 rubygems