Skip to content
Browse files

updated to RSpec 2

  • Loading branch information...
1 parent e65c9a1 commit 67d455460cbec8e25e3feb5230a71237cf340773 @dotemacs dotemacs committed
Showing with 16 additions and 15 deletions.
  1. +1 −0 .rspec
  2. +11 −10 Rakefile
  3. +0 −1 spec/spec.opts
  4. +4 −4 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--color --format doc
View
21 Rakefile
@@ -10,7 +10,7 @@ begin
gem.email = "juanmaiz@gmail.com"
gem.homepage = "http://github.com/softa/activerecord-postgres-hstore"
gem.authors = ["Juan Maiz"]
- gem.add_development_dependency "rspec", ">= 1.2.9"
+ gem.add_development_dependency "rspec", ">= 2.0.0"
gem.files = FileList['.document', '.gitignore', 'LICENSE', 'README.rdoc', 'Rakefile', 'VERSION', 'spec/**/*_spec.rb', 'lib/**/*.rb'].to_a
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
@@ -19,18 +19,19 @@ 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/rake_task'
+RSpec::Core::RakeTask.new do |t|
+ t.rspec_opts = ["-r ./spec/spec_helper.rb"]
+ t.pattern = 'spec/**/*_spec.rb'
end
+# not sure about rcov task...
+# RSpec::Core::RakeTask.new("rcov") do |t|
+# t.rcov = true
+# end
+
+
task :spec => :check_dependencies
task :default => :spec
View
1 spec/spec.opts
@@ -1 +0,0 @@
---color
View
8 spec/spec_helper.rb
@@ -1,9 +1,9 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'activerecord-postgres-hstore'
-require 'spec'
-require 'spec/autorun'
+require 'rspec'
+require 'rspec/autorun'
+
+RSpec.configure do |config|
-Spec::Runner.configure do |config|
-
end

0 comments on commit 67d4554

Please sign in to comment.
Something went wrong with that request. Please try again.