Skip to content

Commit

Permalink
Merged pull request sevenwire#22 from amatsuda/rspec2.
Browse files Browse the repository at this point in the history
Configurations for RSpec 2
  • Loading branch information
Nathan Sutton committed Apr 27, 2011
2 parents 129f3f4 + 88c0f0f commit cb1144a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions Rakefile
@@ -1,6 +1,8 @@
require 'rubygems'
require 'rake'
require 'rspec/core'
require 'rspec/core/rake_task'
require 'rake/rdoctask'
require 'spec/rake/spectask'
require File.expand_path('./lib/forgery/file_writer')

begin
Expand All @@ -13,15 +15,15 @@ desc 'Default: run specs with rcov.'
task :default => :rcov_spec

desc 'Run the specs'
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
t.spec_files = FileList['spec/**/*_spec.rb']
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ['--colour --format progress']
t.pattern = FileList['spec/**/*_spec.rb']
end

desc 'Run the specs with rcov'
Spec::Rake::SpecTask.new("rcov_spec") do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--color']
RSpec::Core::RakeTask.new("rcov_spec") do |t|
t.pattern = FileList['spec/**/*_spec.rb']
t.rspec_opts = ['--color']
t.rcov = true
t.rcov_opts = ['--exclude', '^spec,/gems/']
end
Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
@@ -1,8 +1,8 @@
require 'spec'
require 'rspec'
require File.expand_path(File.dirname(__FILE__) + '/../init')

Spec::Runner.configure do |config|
RSpec.configure do |config|

end

class OnlyContain
Expand Down

0 comments on commit cb1144a

Please sign in to comment.