[Rails] Use assert_select to test for the occurence of a string

2010-12-07 Thread Jim Burgess
Hi, How would I use assert select to test for the occurrence of the string 'DUS' in a 'p' tag about half way down my view? I tried: def test_should_display_airport_names_in_show get :show, :id = flights(:dus_muc).id assert_select 'p', 'DUS' end but Rails is just finding the first 'p' tag

Re: [Rails] Use assert_select to test for the occurence of a string

2010-12-07 Thread Colin Law
On 7 December 2010 18:19, Jim Burgess li...@ruby-forum.com wrote: Hi, How would I use assert select to test for the occurrence of the string 'DUS' in a 'p' tag about half way down my view? I tried: def test_should_display_airport_names_in_show  get :show, :id = flights(:dus_muc).id