Skip to content

Commit

Permalink
Found the flaw in my test, which kept failing the multiple iterations…
Browse files Browse the repository at this point in the history
… of /page/#. Oopsy.
  • Loading branch information
nowk committed Feb 9, 2010
1 parent 1bd3d86 commit 57b007d
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions spec/pagin_spec.rb
Expand Up @@ -66,7 +66,7 @@ def get_absolute(uri)
end end


describe "with Pagin" do describe "with Pagin" do
before(:each) do before(:all) do
MyTestApp.register Sinatra::Pagin MyTestApp.register Sinatra::Pagin
end end


Expand Down Expand Up @@ -104,28 +104,10 @@ def get_absolute(uri)
end end


it "should not respond ok to multiple interations of /page/# ex: /page/1/page/2" do it "should not respond ok to multiple interations of /page/# ex: /page/1/page/2" do
# get "/page/1/page/2" get "/page/1/page/2"
# last_response.should_not be_ok last_response.should_not be_ok
# last_response.status.should == 404 last_response.status.should == 404
# last_request.url.should == "http://example.org/page/1" last_request.url.should == "http://example.org/page/1"
pending <<-NOTE
For some reason it iterates the before block for every instance of /page/#
/page/1/page/2
before seems to iterate for each instance of this. Cause that to be come
/
validating the local_path and executing the request. It shouldn't.
It should only grab the last instance /page/# leaving us with
/page/1
the test for our demo app.
* This works on the live app, so my testing is probably amiss
NOTE
end end


it "should accept a page/0" do it "should accept a page/0" do
Expand Down

0 comments on commit 57b007d

Please sign in to comment.