Permalink
Browse files

update to rspec2

  • Loading branch information...
1 parent c214c4e commit b8de3e8b48e6429c6a10c3412a5437d19f1ae485 Chris Beer committed Dec 13, 2011
View
@@ -3,7 +3,7 @@ PATH
specs:
solrizer (1.1.2)
daemons
- mediashelf-loggable
+ mediashelf-loggable (~> 0.4.7)
nokogiri
om (>= 1.4.0)
stomp
@@ -15,26 +15,34 @@ GEM
RedCloth (4.2.8)
columnize (0.3.4)
daemons (1.1.4)
+ diff-lcs (1.1.3)
linecache (0.46)
rbx-require-relative (> 0.0.4)
- mediashelf-loggable (0.4.7)
+ mediashelf-loggable (0.4.9)
metaclass (0.0.1)
mocha (0.10.0)
metaclass (~> 0.0.1)
nokogiri (1.5.0)
- om (1.4.0)
+ om (1.4.3)
mediashelf-loggable
nokogiri (>= 1.4.2)
rbx-require-relative (0.0.5)
rcov (0.9.10)
- rspec (1.3.2)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
- stomp (1.1.9)
- xml-simple (1.1.0)
+ stomp (1.1.10)
+ xml-simple (1.1.1)
yard (0.7.2)
PLATFORMS
@@ -44,7 +52,7 @@ DEPENDENCIES
RedCloth
mocha
rcov
- rspec (< 2.0.0)
+ rspec (~> 2.0)
ruby-debug
ruby-debug-base
solrizer!
View
@@ -7,19 +7,8 @@ Dir.glob('lib/tasks/*.rake').each { |r| import r }
Bundler::GemHelper.install_tasks
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
-end
-
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
-end
-
-# task :spec => :check_dependencies
+task :spec => ['solrizer:rspec']
+task :rcov => ['solrizer:rcov']
task :default => :spec
@@ -40,13 +40,15 @@ namespace :solrizer do
task :solrize_objects do
puts "Nobody here. Possibly you meant to run rake solrizer:fedora:solrize_objects"
end
-
- Spec::Rake::SpecTask.new(:rspec) do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = lambda do
- IO.readlines("spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
- end
+
+ require 'rspec/core/rake_task'
+ RSpec::Core::RakeTask.new(:rspec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
end
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
+ spec.rcov = true
+ spec.rcov_opts = %q[--exclude "spec/*,gems/*" --rails]
+ end
end
View
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.add_dependency "daemons"
s.add_development_dependency 'ruby-debug'
s.add_development_dependency 'ruby-debug-base'
- s.add_development_dependency 'rspec', '<2.0.0'
+ s.add_development_dependency 'rspec', '~>2.0'
s.add_development_dependency 'rcov'
s.add_development_dependency 'mocha'
s.add_development_dependency 'yard'
View
@@ -1,2 +0,0 @@
---exclude "spec/*,gems/*"
---rails
View
@@ -1,19 +1,11 @@
-$LOAD_PATH.unshift(File.dirname(__FILE__))
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'rubygems'
+require 'rspec'
require 'solrizer'
-require 'spec'
-require 'spec/autorun'
-require 'solrizer'
-require "ruby-debug"
-
-Spec::Runner.configure do |config|
-
+RSpec.configure do |config|
config.mock_with :mocha
-
-
- def fixture(file)
- File.new(File.join(File.dirname(__FILE__), 'fixtures', file))
- end
-
+end
+
+def fixture(file)
+ File.new(File.join(File.dirname(__FILE__), 'fixtures', file))
end
@@ -1,5 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'solrizer'
+require 'spec_helper'
describe Solrizer::Extractor do
@@ -17,4 +16,4 @@
end
end
-end
+end
@@ -1,4 +1,4 @@
-require File.join( File.dirname(__FILE__), "..", "spec_helper" )
+require 'spec_helper'
describe Solrizer::FieldMapper do
@@ -1,4 +1,4 @@
-require File.join( File.dirname(__FILE__), "..", "spec_helper" )
+require 'spec_helper'
describe Solrizer::FieldNameMapper do
@@ -25,4 +25,4 @@ class TestFieldNameMapper
TestFieldNameMapper.new.solr_name(:active_fedora_model, :symbol).should == "active_fedora_model_s"
end
end
-end
+end
@@ -1,5 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'solrizer'
+require 'spec_helper'
describe Solrizer::XML::Extractor do
@@ -26,4 +25,4 @@
end
end
-end
+end
@@ -1,5 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require 'solrizer'
+require 'spec_helper'
require 'solrizer/xml'
describe Solrizer::XML::TerminologyBasedSolrizer do

0 comments on commit b8de3e8

Please sign in to comment.