grosser / autotest

Save a file, autotest will run the matching tests! (Autotest without ZenTest)
121 stars 20 forks source link

Autotest doesn't work with the new way to require spec_helper in RSpec specs #12

Closed daniel closed 13 years ago

daniel commented 13 years ago

Since Rspec 1.2.9 it's possible to require the spec_helper.rb file with just "require 'spec_helper" instead of "require File.dirname(FILE) + '/spec_helper'" (see https://rspec.lighthouseapp.com/projects/5645/tickets/733-figure-out-some-what-to-just-require-spec_helper).

But if you do this autotest doesn't work (The specs fail with "no such file to load -- spec_helper (MissingSourceFile").

It can be fixed by adding "spec" to the -I parameter of the ruby command that autotest calls.

grosser commented 13 years ago

You can use "require 'spec/spec_helper'", this works for most projects afaik. Autotest only covers Test::Unit, so if you want this addition, please open an issue for autotest/rspec2.rb on the rspec project.

daniel commented 13 years ago

OK, I got this working by doing "rspec --configure autotest".