Permalink
Browse files

Migrate to Rspec 2

  • Loading branch information...
1 parent b255eaf commit 8289e5b331f4818a7e675d733d9d636d786606ff @kaluznyo kaluznyo committed Nov 27, 2012
View
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gemspec
View
@@ -1,20 +1,20 @@
require 'rake'
-require 'spec'
-require 'spec/rake/spectask'
+require 'rspec'
+require 'rspec/core/rake_task'
require 'rake/gempackagetask'
task :default => :spec
desc "Run all specs in spec directory"
-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"]
+ t.pattern = 'spec/**/*_spec.rb'
end
desc "Run all specs and generate RCov report"
-Spec::Rake::SpecTask.new('cov') do |t|
- t.spec_files = FileList['spec/**/*.rb']
- t.spec_opts = ["--colour"]
+RSpec::Core::RakeTask.new('cov') do |t|
+ t.pattern = 'spec/**/*.rb'
+ t.rspec_opts = ["--colour"]
t.rcov = true
t.rcov_opts = ['-T --no-html --exclude', 'spec\/,gems\/']
end
View
@@ -15,5 +15,7 @@ Gem::Specification.new do |s|
s.test_files = ["spec/wrapper_methods/get_release_spec.rb", "spec/wrapper_methods/get_master_release_spec.rb", "spec/wrapper_methods/search_spec.rb", "spec/wrapper_methods/get_artist_spec.rb", "spec/wrapper_methods/get_label_spec.rb", "spec/resource_spec.rb", "spec/resources/label_spec.rb", "spec/resources/generic_list_spec.rb", "spec/resources/artist_release_spec.rb", "spec/resources/artist_spec.rb", "spec/resources/release_artist_spec.rb", "spec/resources/search_spec.rb", "spec/resources/label_release_spec.rb", "spec/resources/release_label_spec.rb", "spec/resources/release_spec.rb", "spec/resources/master_release_spec.rb", "spec/resources/master_release_version_spec.rb", "spec/resources/video_spec.rb", "spec/resources/search_result_spec.rb", "spec/resources/image_spec.rb", "spec/resources/track_spec.rb", "spec/resources/format_spec.rb", "spec/wrapper_spec.rb", "spec/spec_helper.rb"]
s.platform = Gem::Platform::RUBY
+
+ s.add_development_dependency "rspec", "= 2.12.0"
end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/spec_helper"
+require 'spec_helper'
describe Discogs::Resource do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Artist::Release do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Artist do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Release::Format do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::GenericList do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Image do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Label::Release do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Label do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::MasterRelease do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::MasterRelease::Version do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Release::Artist do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Release::Label do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Release do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Search::Result do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Search do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Release::Track do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Video do
View
@@ -1,5 +1,5 @@
require 'rubygems'
-require 'spec'
+require 'rspec'
require File.dirname(__FILE__) + '/../lib/discogs'
def valid_release_xml
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/../spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + "/spec_helper"
+require 'spec_helper'
describe Discogs::Wrapper do

0 comments on commit 8289e5b

Please sign in to comment.