I created a really simple example as shown above and this doesn’t work
for me - e.g. no spec_helper or .rspec files in use. I’m on Windows,
could that be the culprit (it happens on two machines)? Here is some
additional output:
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>tree
Folder PATH listing
Volume serial number is E4DF-948C
C:.
└───spec
└───subdir
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>ls -laR
total 0
drwxrwxrwx 1 user group 0 Jun 1 17:01 .
drwxrwxrwx 1 user group 0 Jun 1 06:15 …
drwxrwxrwx 1 user group 0 Jun 1 17:47 spec
spec=:
total 0
drwxrwxrwx 1 user group 0 Jun 1 17:47 .
drwxrwxrwx 1 user group 0 Jun 1 17:01 …
drwxrwxrwx 1 user group 0 Jun 1 17:46 subdir
spec\subdir=:
total 1
drwxrwxrwx 1 user group 0 Jun 1 17:46 .
drwxrwxrwx 1 user group 0 Jun 1 17:47 …
-rw-rw-rw- 1 user group 49 Jun 1 17:46 my_spec.rb
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>cat spec\subdir
\my_spec.rb
describe “my” do
it “example” do
end
end
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>rspec spec
.
Finished in 0.001 seconds
1 example, 0 failures
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>spec spec
.
Finished in 0.037002 seconds
1 example, 0 failures
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>rspec spec\subdir
No examples found.
Finished in 0 seconds
0 examples, 0 failures
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>spec spec
.
Finished in 0.037003 seconds
1 example, 0 failures
C:\Users\jarmo\Desktop\minu\projects\Ruby\myproject>gem list | grep
rspec
rspec (2.6.0, 2.5.0, 2.3.0, 2.1.0, 1.3.1, 1.3.0)
rspec-core (2.6.3, 2.5.1, 2.3.1, 2.3.0, 2.2.1, 2.1.0)
rspec-expectations (2.6.0, 2.5.0, 2.3.0, 2.2.0, 2.1.0)
rspec-mocks (2.6.0, 2.5.0, 2.3.0, 2.2.0, 2.1.0)
rspec-rails (2.3.1, 2.1.0)
Jarmo