This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minor update of the code from this link to make it work with Rails 3: | |
# http://feefighters.com/devblog/2008/11/07/testing-for-broken-links-with-rspec/ | |
class HaveValidLinks | |
# Pass in :fragment=>true if the response contains only an HTML fragment | |
def initialize(options={}) | |
@fragment = options[:fragment] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logs calls to require so if a required file is blowing up, you can | |
# see the last require and diagnose. If your app stops booting, can be handy to | |
# find what borked things. | |
require 'logger' | |
class Object | |
def require(file_name) | |
log = Logger.new(File.join(File.dirname(__FILE__), 'required.log')) | |
log.debug("requiring: #{file_name}") |
NewerOlder