Skip to content

Instantly share code, notes, and snippets.

@marick
Last active December 25, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marick/6997629 to your computer and use it in GitHub Desktop.
Save marick/6997629 to your computer and use it in GitHub Desktop.
rspec not following symlinks into a directory to find specs.
627 $ rails --version
Rails 3.2.13
628 $ rspec --version
2.13.1

Took one lib and one spec directory from application A for use in application B. Call the two directories DD. They went into their own repository.

DD was pulled into the subtrees/DD directory:

B/
  app/
  lib/
  spec/
  subtrees/
    DD/
      lib/
      spec/

So that the two directories would look integrated into B, we used symlinks:

B/
  app/
  lib/
    DD -> ../subtrees/DD/lib
  spec/
    lib/
      DD -> ../../subtrees/DD/spec
  subtrees/
    DD/
      lib/
      spec/

rake spec would find all the specs inside spec, but it would not run the DD specs.

rspec spec/lib/DD/ would run the subtree specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment