shnork
shnork is dwemthy's lil' cousin. he's kinda headstrong but he doesn't take any guff. he explores your website like a dungeon, making sure it's structurally sound, all cavernous.
shnork is link testing for sinatra. lookatitgo!
features
- specify the depth you want to allow shnork to descend
- provide thresholds: allow x number of
404
s or y number of 500
s
syntax
describe "My awesome Sinatra web application" do
include RspecShnork
it "should be a perfect website" do
Sinatra::application.should shnork
end
it "should not be broken beyond four 404 errors and 9 500 errors" do
Sinatra::application.should shnork({404 => 4, 500 => 9})
end
it "should be a perfect from the members section in" do
Sinatra::application.should shnork_at '/members'
end
end
the results are in
Actual code results! Exciting.
1)
'Shnork RSpec matchers should work' FAILED
Shnork found 6 404 errors and 6 500 errors.
One or both of these are over the accepted thresholds (404 -> 0, 500 -> 0).
First 5 discovered 404 errors:
* /broken-link/1
* /broken-link/2
* /broken-link/3
* /broken-link/4
* /broken-link/5
First 2 discovered 500 errors:
* /error/1
* /error/2
* /error/3
./spec/shnork_rspec_spec.rb:8:
Wootabega.
helping out
this code is in its infancy. please feel free to contribute suggestions as to what features you'd like. features have a greater chance of being implemented if you write a spec, or if you fork and write how you think it should work!
here's where you can file bugs.
misc
licensed under the gpl. enjoy.