Permalink
Browse files

Upgrade/Switch to RSpec 2

  • Loading branch information...
1 parent 5424ca1 commit 6d048f467e783d696c5bfcf99f964a3fb357de1a @robolson robolson committed May 23, 2011
Showing with 9 additions and 35 deletions.
  1. +2 −0 .rspec
  2. +2 −8 Rakefile
  3. +3 −11 border_patrol.gemspec
  4. +0 −3 spec/spec.opts
  5. +2 −13 spec/spec_helper.rb
View
@@ -0,0 +1,2 @@
+--color
+--backtrace
View
@@ -3,13 +3,7 @@ require 'bundler'
Bundler.setup
require 'rake'
-require 'spec/rake/spectask'
-
-
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.spec_files = FileList['spec/**/*_spec.rb']
- spec.libs << 'spec'
- spec.spec_opts = ["--options", "spec/spec.opts"]
-end
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec)
task :default => :spec
View
@@ -3,27 +3,19 @@
Gem::Specification.new do |s|
s.name = "border_patrol"
s.version = File.read("lib/VERSION").strip
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.rubygems_version = "1.3.7"
-
s.authors = ["Zach Brock", "Matt Wilson"]
s.email = "eng@squareup.com"
-
s.date = "2010-10-20"
s.description = "Lets you import a KML file and then check if points are inside or outside the polygons the file defines."
s.summary = "Import and query KML regions"
s.homepage = "http://github.com/square/border_patrol"
- s.rdoc_options = ["--charset=UTF-8"]
-
s.require_paths = ["lib"]
- root_files = %w(border_patrol.gemspec Rakefile README.markdown .gitignore Gemfile)
- s.files = Dir['{lib,spec}/**/*'] + root_files
- s.test_files = Dir['spec/**/*']
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- spec/*`.split("\n")
s.add_dependency("nokogiri", ">= 1.4.3.1")
s.add_development_dependency("rake")
- s.add_development_dependency("rspec", "~> 1.3.0")
+ s.add_development_dependency("rspec", "~> 2.6.0")
end
View
@@ -1,3 +0,0 @@
---colour
---loadby mtime
---backtrace
View
@@ -2,18 +2,7 @@
require 'bundler'
Bundler.setup
-require 'nokogiri'
+require 'border_patrol'
-base_dir = File.expand_path("#{File.dirname(__FILE__)}/..")
-app_dirs = ['lib', 'lib/kaml_pen']
-
-app_dirs.each do |app_dir|
- Dir["#{base_dir}/spec/#{app_dir}/*.rb"].each do |f|
- f.sub!('/spec','')
- f.sub!('_spec','')
- require f
- end
-end
-
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
end

0 comments on commit 6d048f4

Please sign in to comment.