Wednesday, December 3, 2008

custom assert_select_rjs matcher

Background:
I wanted to test rjs redirection:


Problem:
ActionController::Assertions::SelectorAssertions#assert_select_rjs don't know about :redirect_to

Solution:
I don't know if this is the right solution but I added this at the end of my test_helper.rb then I can assert by :redirect_to now