Permalink
Browse files

rspec: Migrated to RSpec 2.1.0

  • Loading branch information...
1 parent d46decb commit 7f1d54615278cc97dfaa495b550a616a413ec17a Kaoru Kobo committed Feb 10, 2011
Showing with 11 additions and 17 deletions.
  1. +5 −11 Rakefile
  2. +6 −6 spec/spec_helper.rb
View
@@ -13,7 +13,7 @@ begin
gem.email = ""
gem.homepage = "http://github.com/kaorukobo/rhook"
gem.authors = ["Kaoru Kobo"]
- gem.add_development_dependency "rspec", ">= 1.2.9"
+ gem.add_development_dependency "rspec", ">= 2.1.0"
gem.add_development_dependency "yard", "~> 0.6.0"
gem.has_rdoc = "yard"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
@@ -23,16 +23,10 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-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
+require 'rspec/core'
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
end
task :spec => :check_dependencies
View
@@ -1,13 +1,13 @@
require 'rubygems'
-gem 'rspec', "< 2.0"
+gem 'rspec', ">= 2.0"
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rhook'
-require 'spec'
-require 'spec/autorun'
+require "rspec"
-Spec::Runner.configure do |config|
-
-end
+RSpec.configure { |config|
+}
+local_config = File.dirname(__FILE__)+"/local_spec_config.rb"
+require local_config if File.exist?(local_config)

0 comments on commit 7f1d546

Please sign in to comment.