views:

21

answers:

1

In one of my project with some existing code, some code is covered by _test.rb file, other is by _spec.rb and we introduced .feature

It became a nice mixture of stuff to check. I am stumped how to run .feature, _spec.rb and _test.rb for red-green cycles.

A: 

After some searching around the web, I found the solution in .autotest file

Autotest.add_hook :reset do |at|
  # at.clear_mappings
  at.add_mapping(/^(.*?)(_spec)?\.rb$/) { |filename, m| m[2] ? filename : "#{m[1]}_spec.rb" }
end

obviously with all appropriate gems installed, simply run autotest

I am now looking for a smarter /better/ optimized way to do this.

ramonrails