Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec
...
head fork: rspec/rspec
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 24, 2010
@dchelimsky dchelimsky Add spec command for backward compatibility
- provides notice explaining
  - use rspec for rspec-2, spec for rspec-1
  - how to use spec if you have both versions installed
6f87308
@dchelimsky dchelimsky Add experimental 'spec' command for backward compatibility with rspec-1 43df7a6
Showing with 30 additions and 0 deletions.
  1. +24 −0 bin/spec
  2. +6 −0 spec/rspec/deprecation_spec.rb
View
24 bin/spec
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+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.
+
+To run examples with rspec-2, please use:
+
+ rspec #{ARGV.join(' ')}
+
+If you are trying to run specs using rspec-1, make sure rspec-1 is installed in
+this environment, and then run it with the version argument:
+
+ spec _1.3.1_ #{ARGV.join(' ')}
+
+*************************************************************************
+WARNING
+ require 'rspec/autorun'
+end
View
6 spec/rspec/deprecation_spec.rb
@@ -0,0 +1,6 @@
+describe "spec command" do
+ it "is deprecated" do
+ RSpec.should_receive(:warn_deprecation)
+ load File.expand_path('../../../bin/spec', __FILE__)
+ end
+end

No commit comments for this range

Something went wrong with that request. Please try again.