Limit Integration tests run by autotest (Rails) -
i'm using autotest, , have added hooks run integration tests. while working, time make change impacts of integration tests, integration tests rerun. behavior i'd change, if possible. (i'm using rspec webrat tests, no cucumber)
with non-integration tests, pattern reruns tests in same spec file (or describe block?) if change test or describing. so, have page_controller.rb , page_controller_spec.rb. autotest knows if change 1 of files, runs tests in page_controller_spec, then, if passes, runs tests. i'd similar integration tests -- run tests in file failing test first, run tests if pass.
my .autotest file looks this
require "autotest/growl" require "autotest/fsevent" autotest.add_hook :initialize |autotest| autotest.add_mapping(/^spec\/integration\/.*_spec\.rb$/) autotest.files_matching(/^spec\/integration\/.*_spec\.rb$/) end end
your .autotest
source of problem :) says any file in /spec/integration
directory, all of them should run. should return matched filename, this:
require "autotest/growl" require "autotest/fsevent" autotest.add_hook :initialize |autotest| autotest.add_mapping(/^spec\/integration\/.*_spec\.rb$/) |filename| filename end end
Comments
Post a Comment