Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Added: support simplecov on Ruby 1.9 refs #53
Browse files Browse the repository at this point in the history
  • Loading branch information
mallowlabs committed Apr 14, 2013
1 parent 3045035 commit ec0ef69
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ group :development, :test do

gem "rspec-rails", ">= 2.11.4"
gem 'rcov', :platforms => :ruby_18
gem 'simplecov', :platforms => :ruby_19
gem 'ci_reporter'

gem 'spork'
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ GEM
tilt (~> 1.3)
signature (0.1.2)
ruby-hmac
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
socky-authenticator (0.5.0.beta5)
json
ruby-hmac
Expand Down Expand Up @@ -243,6 +247,7 @@ DEPENDENCIES
rest-client
rspec-rails (>= 2.11.4)
sass-rails
simplecov
socky-client (>= 0.5.0.beta1)
socky-server (>= 0.5.0.beta1)
spork
Expand Down
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ if %(development test).include?(Rails.env)
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'

namespace :plugins do
RSpec::Core::RakeTask.new(:spec) do|t|
t.pattern = "./plugins/as_*/spec/**/*_spec.rb"
namespace :spec do
RSpec::Core::RakeTask.new(:all) do |t|
t.pattern = ["./spec/**/*_spec.rb", "./plugins/as_*/spec/**/*_spec.rb"]
end
end

task :default => [:spec, :'plugins:spec']
task :default => [:'spec:all']
end

10 changes: 10 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
require 'rspec/autorun'

Spork.prefork do
if (not ENV['DRB']) and RUBY_VERSION >= '1.9'
begin
require 'simplecov'
SimpleCov.start 'rails' do
add_filter '.bundle'
end
rescue LoadError
end
end

# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
Expand Down

0 comments on commit ec0ef69

Please sign in to comment.