ferblape / cache_test

Some assertions for testing that fragment cache, and action cache is generated or expired

This URL has Read+Write access

ferblape (author)
Sun Feb 08 22:28:20 -0800 2009
commit  a606f513252b8b5588f11070a647ce68823bd94c
tree    98d5f9b0ff1914624e96de90489caefd320c4b0d
parent  0457bcee5de034d36b928b187a1bf4aa175e0b68
cache_test / Rakefile
100644 35 lines (28 sloc) 0.886 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
# Test::Unit::UI::VERBOSE
test_files_pattern = 'test/{unit,functional,other}/**/*_test.rb'
Rake::TestTask.new do |t|
  t.libs << 'lib'
  t.pattern = test_files_pattern
  t.verbose = false
end
 
Rake::RDocTask.new { |rdoc|
  rdoc.rdoc_dir = 'doc'
  rdoc.title = "Cache Test -- Some helpers for testing fragment/action cache"
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.template = "#{ENV['template']}.rb" if ENV['template']
  # rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
}
 
desc "Run code-coverage analysis using rcov"
task :coverage do
  rm_rf "coverage"
  files = Dir[test_files_pattern]
  system "rcov --rails --sort coverage -Ilib #{files.join(' ')}"
end
 
desc 'Default: run tests.'
task :default => ['test']
 
Dir['tasks/*.rake'].each do |f|
  load f
end