macournoyer / invisible

The invisible framework

This URL has Read+Write access

macournoyer (author)
Tue Mar 24 18:32:34 -0700 2009
commit  2333383a458b24ededd8ce6fa3a6ade206cf7d12
tree    4904e35eb8a43ea936b047e31e7554e42223f538
parent  30454dd44d4b67b676d2d98fbb078c99ea49d464
invisible / spec / params_spec.rb
100644 22 lines (19 sloc) 0.475 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require File.dirname(__FILE__) + "/spec_helper"
 
describe "params" do
  before do
    @app = Invisible.new do
      get "/" do
        render params.inspect
      end
      get "/:path" do
        render params.inspect
      end
    end
  end
  
  it "should include request params" do
    @app.mock.get("/?oh=aie").body.should == { :oh => 'aie' }.inspect
  end
 
  it "should include path params" do
    @app.mock.get("/oh").body.should == { :path => 'oh' }.inspect
  end
end