RSpec, Autotest and views

Tuesday, April 17th, 2007

The current incarnation of autotest seems to assume that you are using integrated views. If not, you can modify the rspec_rails_autotest.rb file to run the view specs as well:

 
  # when %r%^app/views/layouts/(.*)\.rhtml% then
  #   ["spec/views/layouts/#{$1}_spec.rb"]
  when %r%^app/views/(.*)\.rhtml$% then
    ["spec/views/#{$1}_view_spec.rb"]
 

Your view spec must be postfixed with “_view_spec.rb” for it to work

Update This works out of the box now.

Autotest 3.5.0 and Growl

Friday, April 13th, 2007

Autotest 3.5.0 is out, and the result given from Autotest is no longer a String, it’s an array of strings. So if you still want Growl to function properly just modify the .autotest slightly: