Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade/Switch to RSpec 2

  • Loading branch information...
commit 6d048f467e783d696c5bfcf99f964a3fb357de1a 1 parent 5424ca1
@robolson robolson authored
View
2  .rspec
@@ -0,0 +1,2 @@
+--color
+--backtrace
View
10 Rakefile
@@ -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
14 border_patrol.gemspec
@@ -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
3  spec/spec.opts
@@ -1,3 +0,0 @@
---colour
---loadby mtime
---backtrace
View
15 spec/spec_helper.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.