diff options
author | francis <francis> | 2008-01-23 01:55:01 +0000 |
---|---|---|
committer | francis <francis> | 2008-01-23 01:55:01 +0000 |
commit | f906a3ab0b3f1ed0f18e5b605787cfa7c084b19a (patch) | |
tree | c7c35b6831f57f24f7d7cab780c065f4d3cd3f9a /vendor/plugins/rspec_on_rails/tasks | |
parent | fdaa98e06ba6d6f8b62480a83e9ecffdbcb21402 (diff) |
Upgrade to new rspec_on_rails (that is with rspec 1.1.2)
Diffstat (limited to 'vendor/plugins/rspec_on_rails/tasks')
-rw-r--r-- | vendor/plugins/rspec_on_rails/tasks/rspec.rake | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/vendor/plugins/rspec_on_rails/tasks/rspec.rake b/vendor/plugins/rspec_on_rails/tasks/rspec.rake index c9536e86a..722854740 100644 --- a/vendor/plugins/rspec_on_rails/tasks/rspec.rake +++ b/vendor/plugins/rspec_on_rails/tasks/rspec.rake @@ -25,7 +25,9 @@ namespace :spec do t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList['spec/**/*_spec.rb'] t.rcov = true - t.rcov_opts = ['--exclude', 'spec', '--rails'] + t.rcov_opts = lambda do + IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten + end end desc "Print Specdoc for all specs (excluding plugin specs)" @@ -56,7 +58,7 @@ namespace :spec do namespace :plugins do desc "Runs the examples for rspec_on_rails" - Spec::Rake::SpecTask.new(:rspec_on_rails => spec_prereq) do |t| + Spec::Rake::SpecTask.new(:rspec_on_rails) do |t| t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList['vendor/plugins/rspec_on_rails/spec/**/*_spec.rb'] end @@ -72,14 +74,16 @@ namespace :spec do # Setup specs for stats task :statsetup do require 'code_statistics' - ::STATS_DIRECTORIES << %w(Model\ specs spec/models) - ::STATS_DIRECTORIES << %w(View\ specs spec/views) - ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) - ::STATS_DIRECTORIES << %w(Helper\ specs spec/views) - ::CodeStatistics::TEST_TYPES << "Model specs" - ::CodeStatistics::TEST_TYPES << "View specs" - ::CodeStatistics::TEST_TYPES << "Controller specs" - ::CodeStatistics::TEST_TYPES << "Helper specs" + ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models') + ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views') + ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers') + ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers') + ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib') + ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models') + ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views') + ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers') + ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers') + ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib') ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/} end |