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


2 comments:

Uberllama said...

This was just the trick for a search I was writing today! FYI, I noticed a patch ticket for this in the rails lighthouse, so I expect it to be in an official release soon. Cheers.

mohit abram said...

PLEASE READ PLEASE READ PLEASE READ
Hello everyone, i would like to share my experience on this platform. i have been hearing of Blank Atm for a while and i applied through a few people but i was scammed, not until i found Mr George who saved me from scammers, i got my blank ATM card in 5 days after application and tried the encrypted card in an ATM machine and pos cash store to my greatest surprise i was able to withdraw $3000 and that was the daily rate i applied for. to be honest there is no risk involved the card is not traceable and has an infrared signal that blocks off CCTV during your withdrawals. i just payed my daughters tuition fee and cleared my mortgage debts, i am also richer and started a business that is doing fine. Mr George is really a life saver and he is very genuine. You can contact him with this email address: blankatm402@gmail.com
Best wishes