Closed ZhangHanDong closed 13 years ago
Please ask questions on the mailing list. This is reserved for bug reports.
To answer your question, if you want to run your steak specs on any change to a Rails app, your autotest/discover.rb file can be something like:
Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }
Autotest.add_hook :initialize do |at|
at.add_mapping(/^spec\/acceptance\/.*_spec.rb$/) { |f| f }
end
i got it, thank you!
your config doesn't work!
it should be like the following:
Autotest.add_discovery { "rails" } Autotest.add_discovery { "rspec2" } Autotest.add_hook :initialize do |at| at.add_mapping(%r%^spec/acceptance/.*_spec.rb$%, true) { |filename, _| filename } at.add_mapping(%r%^app/(models|controllers|helpers|lib)/.*rb$%, true) { at.files_matching %r%^spec/acceptance/.*_spec.rb$% } at.add_mapping(%r%^app/views/(.*)$%, true) { at.files_matching %r%^spec/acceptance/.*_spec.rb$% } end
how to use autotest with steak?