public
Description: Rack::Test is a layer on top of Rack's MockRequest similar to Merb's RequestHelper
Homepage:
Clone URL: git://github.com/brynary/rack-test.git
rack-test / Rakefile
100644 40 lines (34 sloc) 0.953 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
36
37
38
39
40
require "rubygems"
 
begin
  require "spec/rake/spectask"
rescue LoadError
  desc "Run specs"
  task(:spec) { $stderr.puts '`gem install rspec` to run specs' }
else
  Spec::Rake::SpecTask.new do |t|
    t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
    t.libs << 'lib'
    t.libs << 'spec'
    t.warning = true
  end
 
  task :default => :spec
 
  desc "Run all specs in spec directory with RCov"
  Spec::Rake::SpecTask.new(:rcov) do |t|
    t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
    t.libs << 'lib'
    t.libs << 'spec'
    t.warning = true
    t.rcov = true
    t.rcov_opts = ['-x spec']
  end
end
 
desc "Generate RDoc"
task :docs do
  FileUtils.rm_rf("doc")
  require "rack/test"
  system "hanna --title 'Rack::Test #{Rack::Test::VERSION} API Documentation'"
end
 
desc 'Removes trailing whitespace'
task :whitespace do
  sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
end