Permalink
Browse files

Install rcov

  • Loading branch information...
1 parent 35f47fc commit 8f4114faff6338dd83e5d7b704f2e3d6f6086c89 @sferik committed Oct 26, 2010
Showing with 16 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 Gemfile.lock
  3. +12 −2 Rakefile
  4. +1 −0 rails_admin.gemspec
View
@@ -5,6 +5,7 @@
db/*.sqlite3
db/*.sqlite3-journal
doc/*
+coverage/*
log/*.log
pkg/*
spec/dummy_app/db/schema.rb
View
@@ -85,6 +85,7 @@ GEM
rake (>= 0.8.4)
thor (~> 0.14.0)
rake (0.8.7)
+ rcov (0.9.9)
rspec (2.0.1)
rspec-core (~> 2.0.1)
rspec-expectations (~> 2.0.1)
@@ -114,6 +115,7 @@ DEPENDENCIES
dummy_data (~> 0.9)
rails (~> 3.0.1)
rails_admin!
+ rcov (~> 0.9)
rspec-rails (~> 2.0)
sqlite3-ruby (~> 1.3)
webrat!
View
@@ -10,6 +10,16 @@ require 'bundler'
Bundler::GemHelper.install_tasks
Rspec::Core::RakeTask.new(:spec)
+namespace :spec do
+ desc "Run all examples using rcov"
+ RSpec::Core::RakeTask.new(:rcov => :cleanup_rcov_files) do |task|
+ task.rcov = true
+ task.rcov_opts = %[-Ilib -Ispec --exclude ".bundler/*,gems/*,features,specs" --text-report --sort coverage]
+ end
+end
-desc 'Run RSpec code examples'
-task :default => :spec
+task :cleanup_rcov_files do
+ rm_rf 'coverage'
+end
+
+task :default => ["spec:rcov"]
View
@@ -3,6 +3,7 @@ require File.expand_path("../lib/rails_admin/version", __FILE__)
Gem::Specification.new do |s|
s.add_development_dependency("dummy_data", ["~> 0.9"])
+ s.add_development_dependency("rcov", ["~> 0.9"])
s.add_development_dependency("rspec-rails", ["~> 2.0"])
s.add_development_dependency("sqlite3-ruby", ["~> 1.3"])
s.add_development_dependency("devise", ["~> 1.1.0"])

0 comments on commit 8f4114f

Please sign in to comment.