Skip to content

Instantly share code, notes, and snippets.

View halorgium's full-sized avatar

Tim Carey-Smith halorgium

View GitHub Profile
describe "Without logging in" do
describe "a request to /foo/bar" do
before(:each) do
get("/foo/bar")
end
it "redirects" do
rack.status.should == 302
end
@halorgium
halorgium / gist:4722
Created August 10, 2008 04:28 — forked from wycats/gist:4721
def requirable?(filename)
result = fork do
begin
require filename
exit!(0)
rescue
exit!(1)
end
end
result == 0 ? true : false