README.rdoc in jsmestad-stale_fish-1.0.0 vs README.rdoc in jsmestad-stale_fish-1.1.0

- old
+ new

@@ -5,12 +5,14 @@ == How To Simply drop in a YAML file in your application (for rails, RAILS_ROOT/config/stale_fish.yml is preferred) and issue the following commands. A sample YAML file: - --- - stale: + + stale: + configuration: + use_fakeweb: true yahoo: filepath: ./tmp/yahoo.html source: http://www.yahoo.com updated: frequency: 1.day @@ -22,29 +24,49 @@ Specify one block for every fixture you would like to update. The frequency field takes any relative date included in the ActiveSupport library. === RSpec -For a single test: +For a single test add it to a before block describe UsersController do before do StaleFish.load_config = "#{RAILS_ROOT}/config/stale_fish.yml" - StaleFish.update_stale + StaleFish.update_stale("facebook", "yahoo") end .... end -For all tests: +For all tests add the following to spec_helper.rb Spec::Runner.configure do |config| ... before do StaleFish.load_config = "#{RAILS_ROOT}/config/stale_fish.yml" StaleFish.update_stale end .... end + +=== Test::Unit + +For all tests add the following to test_helper.rb + + class Test::Unit::TestCase + ... + self.use_transactional_fixtures = true + self.use_instantiated_fixtures = false + ... + setup do + StaleFish.load_config = "#{RAILS_ROOT}/config/stale_fish.yml" + StaleFish.update_stale + end + ... + end + +== More Info + +View the wiki: http://wiki.github.com/jsmestad/stale_fish == Copyright Copyright (c) 2009 Justin Smestad. See LICENSE for details.