Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds in working code coverage and spec reporting

  • Loading branch information...
commit 55f8faa86ac82d3d1f954b39bec2a8c86cec463f 1 parent 991e716
Sean Grove sgrove authored
3  Gemfile
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
9 Rakefile
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
1  tane.gemspec
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"
10 tasks/spec.rake
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
11 tasks/tane.rake
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
Please sign in to comment.
Something went wrong with that request. Please try again.