Permalink
Browse files

Adds in working code coverage and spec reporting

  • Loading branch information...
1 parent 991e716 commit 55f8faa86ac82d3d1f954b39bec2a8c86cec463f @sgrove sgrove committed Dec 6, 2011
Showing with 33 additions and 1 deletion.
  1. +2 −1 Gemfile
  2. +9 −0 Rakefile
  3. +1 −0 tane.gemspec
  4. +10 −0 tasks/spec.rake
  5. +11 −0 tasks/tane.rake
View
@@ -9,5 +9,6 @@ group :development, :test do
end
group :test do
- gem "cover_me"
+ gem 'cover_me', '>= 1.0.0.rc6'
+ gem 'ci_reporter'
end
View
@@ -1 +1,10 @@
require "bundler/gem_tasks"
+
+# Import the Tane rake tasks
+import 'tasks/tane.rake'
+
+Dir['tasks/**/*.rake'].each { |rake| load rake }
+
+if ENV["RAILS_ENV"] != "production"
+ require 'ci/reporter/rake/rspec'
+end
View
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
# specify any dependencies here; for example:
s.add_development_dependency "rspec"
s.add_dependency "awesome_print"
+ s.add_dependency "rake"
s.add_runtime_dependency "erubis"
s.add_runtime_dependency "rest-client"
s.add_runtime_dependency "highline"
View
@@ -0,0 +1,10 @@
+require 'rspec/core/rake_task'
+
+RSpec::Core::RakeTask.new(:spec)
+
+task :default => :spec
+
+desc "Run the cas_fuji specs and build the cover_me report"
+task :spec do
+ Rake::Task['cover_me:report'].invoke
+end
View
@@ -0,0 +1,11 @@
+require 'cover_me'
+
+namespace :cover_me do
+ desc "Generate coverage report after running specs"
+ task :report do
+ puts "Reporting!"
+ CoverMe.config.formatter = CoverMe::EmmaFormatter
+ CoverMe.config.at_exit = Proc.new {}
+ CoverMe.complete!
+ end
+end

0 comments on commit 55f8faa

Please sign in to comment.