Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


use binstub if present #1241

wants to merge 1 commit into from

4 participants



This updates the rake task to use bin/rspec if it's present.

Please see previous discussion @ rspec/rspec-rails#914

@bolandrm bolandrm referenced this pull request in rspec/rspec-rails

use bin/rspec if present #914


The build is failing because the travis build winds up with bin/rspec so that file is present for the specs. To setup and run the build the same locally, do this:

$ bundle install --standalone --binstubs
$ bin/rspec

It would also be nice to having a spec that shows that rspec is used if bin/rspec is not present (even if the test suite was launched from bin/rspec -- you may have to fake it out) and another that shows that bin/rspec is used if present (even if it wasn't originally present when the test suite was launched).


@myronmarston Sure thing, I'll fix it up.


@bolandrm are you still up for doing this? It'd be cool to see this pull request closed! :sparkles:


Closing, stale.

@xaviershay xaviershay closed this

This has personally affected me so I've been planning to wrap this one up. Going to reopen so I don't forget.

@myronmarston myronmarston reopened this
@myronmarston myronmarston added this to the 3.0 milestone

Closing in favor of #1494.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 6, 2014
  1. @bolandrm

    use binstub if present

    bolandrm authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rspec/core/rake_task.rb
2  lib/rspec/core/rake_task.rb
@@ -84,7 +84,7 @@ def setup_ivars(args)
@ruby_opts, @rspec_opts = nil, nil, nil
@verbose, @fail_on_error = true, true
- @rspec_path = 'rspec'
+ @rspec_path = File.exists?('bin/rspec') ? 'bin/rspec' : 'rspec'
@pattern = './spec{,/*/**}/*_spec.rb'
Something went wrong with that request. Please try again.