Permalink
Browse files

use cover_me

update attr_required
  • Loading branch information...
1 parent 8adb71c commit 9838390ebf368529c8572218669315c19b44a683 @nov committed Feb 16, 2012
Showing with 22 additions and 7 deletions.
  1. +10 −3 Rakefile
  2. +6 −2 paypal-express.gemspec
  3. +6 −2 spec/spec_helper.rb
View
13 Rakefile
@@ -4,9 +4,16 @@ Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
-RSpec::Core::RakeTask.new(:rcov) do |spec|
- spec.rcov = true
- spec.rcov_opts = ['-Ilib -Ispec --exclude spec,gems']
+if RUBY_VERSION >= '1.9'
+ require 'cover_me'
+ CoverMe.config do |c|
+ c.file_pattern = /(#{CoverMe.config.project.root}\/lib\/.+\.rb)/i
+ end
+else
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.rcov = true
+ spec.rcov_opts = ['-Ilib -Ispec --exclude spec,gems']
+ end
end
task :default => :spec
View
8 paypal-express.gemspec
@@ -16,9 +16,13 @@ Gem::Specification.new do |s|
s.add_dependency "activesupport", ">= 2.3"
s.add_dependency "i18n"
s.add_dependency "restclient_with_cert"
- s.add_dependency "attr_required", ">= 0.0.3"
+ s.add_dependency "attr_required", ">= 0.0.5"
s.add_development_dependency "rake", ">= 0.8"
- s.add_development_dependency "rcov", ">= 0.9"
+ if RUBY_VERSION >= '1.9'
+ s.add_development_dependency "cover_me", ">= 1.2.0"
+ else
+ s.add_development_dependency "rcov", ">= 0.9"
+ end
s.add_development_dependency "rspec", ">= 2"
s.add_development_dependency "fakeweb", ">= 1.3.0"
end
View
8 spec/spec_helper.rb
@@ -1,5 +1,9 @@
-$LOAD_PATH.unshift(File.dirname(__FILE__))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+if RUBY_VERSION >= '1.9'
+ require 'cover_me'
+ at_exit do
+ CoverMe.complete!
+ end
+end
require 'paypal'
require 'rspec'

0 comments on commit 9838390

Please sign in to comment.