public
Description: link checking fun for sinatra websites
Homepage: http://github.com/ardekantur/shnork
Clone URL: git://github.com/ardekantur/shnork.git
shnork /
name age message
file .gitignore Thu Nov 20 20:07:29 -0800 2008 ignoring lots of things [ardekantur]
file Rakefile Sun Nov 16 06:27:12 -0800 2008 initial rakefile, gemspec, one spec that actual... [ardekantur]
directory lib/ Tue Nov 25 18:13:56 -0800 2008 more intelligent rspec matcher messages [ardekantur]
file readme.md Tue Nov 25 18:17:06 -0800 2008 updated readme with results of new rspec failur... [ardekantur]
file shnork.gemspec Sun Dec 14 16:12:50 -0800 2008 bump version [ardekantur]
directory spec/ Sun Dec 14 19:08:00 -0800 2008 make tests pass for consistency, add a comment ... [ardekantur]
readme.md

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 404s or y number of 500s

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.