4

Here is a thread I looked at:

How to run a single RSpec test?

One answer says to use rspec to run tests. Another answer (originally?) said to use rake spec to run tests but then a commenter said it's spec not rake spec. And I have some notes on using rspec that say:

#RSpec prefix not required if you run your program
#with `spec` command 

RSpec.describe 'some task' do
  it 'blah blah blah' do
    true
  end
end

I can find no information on the spec command, and it doesn't appear to exist on my system:

$ which rspec
/Users/7stud/.rvm/gems/ruby-2.2.1/bin/rspec

$ which spec
$ 

Is the spec command a rails feature?

7stud
  • 46,922
  • 14
  • 101
  • 127
  • 5
    The `spec` command was used for RSpec 1; from RSpec 2, it switched to the `rspec` command. As for the difference between running `$ rake spec` and `$ rspec`, the best explanation I can find is [here](https://github.com/rspec/rspec-rails/issues/208#issuecomment-413114). – Paul Fioravanti Oct 17 '15 at 23:44
  • Ah. Thanks @PaulFioravanti. – 7stud Oct 18 '15 at 01:05

0 Answers0