Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add experimental 'spec' command for backward compatibility with rspec-1

  • Loading branch information...
commit 43df7a6dd2f2c2c55125f66cfec6795f7a5995fc 1 parent 6f87308
@dchelimsky dchelimsky authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 bin/spec
View
12 bin/spec
@@ -1,6 +1,11 @@
#!/usr/bin/env ruby
-require 'rspec/core'
-RSpec.warn_deprecation <<-WARNING
+require 'rubygems'
+case ARGV.first
+when /^_1/
+ ARGV.shift
+ require 'spec/autorun'
+else
+ warn <<-WARNING
*************************************************************************
NOTICE: The 'spec' command was changed to 'rspec' in RSpec-2.
@@ -15,4 +20,5 @@ this environment, and then run it with the version argument:
*************************************************************************
WARNING
-require 'rspec/autorun'
+ require 'rspec/autorun'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.