Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move to rspec2

  • Loading branch information...
commit 4fe2e4e410f17da63009976e4b7f39fea506e393 1 parent 07ddf3b
@brianmario authored
Showing with 11 additions and 15 deletions.
  1. +2 −0  .rspec
  2. +8 −12 Rakefile
  3. +0 −2  spec/spec.opts
  4. +1 −1  spec/spec_helper.rb
View
2  .rspec
@@ -0,0 +1,2 @@
+--format documentation
+--colour
View
20 Rakefile
@@ -19,22 +19,18 @@ rescue LoadError
end
begin
- require 'rake'
- require 'spec/rake/spectask'
+ require 'rspec'
+ require 'rspec/core/rake_task'
desc "Run all examples with RCov"
- Spec::Rake::SpecTask.new('spec:rcov') do |t|
- t.spec_files = FileList['spec/']
+ RSpec::Core::RakeTask.new('spec:rcov') do |t|
t.rcov = true
- t.rcov_opts = lambda do
- IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
- end
end
- Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_files = FileList['spec/']
- t.libs << 'ext'
- t.spec_opts << '--options' << 'spec/spec.opts'
+ RSpec::Core::RakeTask.new('spec') do |t|
+ t.verbose = true
end
+
+ task :default => :spec
rescue LoadError
- puts "RSpec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
+ puts "rspec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
end
View
2  spec/spec.opts
@@ -1,2 +0,0 @@
---format specdoc
---colour
View
2  spec/spec_helper.rb
@@ -2,7 +2,7 @@
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/..')
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
-require 'rubygems'
+require 'rspec'
require 'yajl'
require 'date'
Please sign in to comment.
Something went wrong with that request. Please try again.