Rangi Lin
Rangi Lin

Reputation: 9451

How can I run rspec inside rspec-mode?

I have a directory with files like this

.
├── example.rb
└── example_spec.rb

And my init.el :

(require 'rspec-mode)
(setq-default rspec-use-rvm t)

(require 'rvm)
(rvm-use-default)

When I try to run any of the verify functions inside the example_spec.rb will result the error :

rspec-project-root: Could not determine the project root.

How do I make rspec-mode able to determine the project root and run rspec ?

Upvotes: 3

Views: 320

Answers (1)

user2053036
user2053036

Reputation:

Looking at docstring of rspec-project-root it seems it looks for Rakefile in the presenst directory or a parent directory. Here is the docstring

Finds the root directory of the project by walking the directory tree until it 
finds a rake file.

The code suggests that a gem file will also do.

Upvotes: 5

Related Questions