Skip to content
Browse files

updated Rakefile (rcov tasks and load), now works with latest shoulda…

… (not tpitale-shoulda)
  • Loading branch information...
1 parent 7bfd461 commit 83357dad27849d521f7412f5fe7f18b6cf99018d @tpitale tpitale committed Jul 6, 2010
Showing with 10 additions and 3 deletions.
  1. +5 −3 Rakefile
  2. +5 −0 test/test_helper.rb
View
8 Rakefile
@@ -1,7 +1,8 @@
require 'rake/gempackagetask'
require 'rake/testtask'
-require 'lib/garb/version'
+$:.unshift File.expand_path('../lib', __FILE__)
+require 'garb'
task :default => :test
@@ -40,11 +41,12 @@ end
begin
require 'rcov/rcovtask'
-
+
desc "Generate RCov coverage report"
Rcov::RcovTask.new(:rcov) do |t|
+ t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
- t.rcov_opts << "-x lib/garb.rb -x lib/garb/version.rb"
+ t.rcov_opts << "-x \"test/*,gems/*,/Library/Ruby/*,config/*\" -x lib/garb.rb -x lib/garb/version.rb --rails"
end
rescue LoadError
nil
View
5 test/test_helper.rb
@@ -9,6 +9,11 @@
require 'garb'
class MiniTest::Unit::TestCase
+ include Shoulda::InstanceMethods
+ extend Shoulda::ClassMethods
+ include Shoulda::Assertions
+ extend Shoulda::Macros
+ include Shoulda::Helpers
def read_fixture(filename)
File.read(File.dirname(__FILE__) + "/fixtures/#{filename}")

0 comments on commit 83357da

Please sign in to comment.
Something went wrong with that request. Please try again.