guard / guard-rspec

Guard::RSpec automatically run your specs (much like autotest)

Home Page:https://rubygems.org/gems/guard-rspec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specs don't run when file changes (spec/lib/foo_spec.rb vs spec/foo_spec.rb)

e2 opened this issue · comments

Expected: changing lib/foo.rb should run spec/foo_spec.rb if it exists
Actual: spec/foo_spec.rb is not run, because spec/lib/foo_spec.rb is expected to exist

Solution: since there's no consensus (some projects have spec/lib, some don't) and configuration/debugging isn't trivial, it's best to "detect" which spec file exists when the file is prefixed with lib/