[rspec-users] Not seeing an RJS change
nick at deadorange.com
Sun Sep 28 17:20:05 EDT 2008
I'm writing specs for an XHR, and am having troubles getting my specs
to see that a <div> is being hidden.
20 puts "map_filter.rjs> else!"
21 # Display the filter errors.
23 page['map-filter-errors'].replace_html @map_filter_errors.join
24 page['map-filter-errors'].visual_effect :blind_down
When the spec runs, line 20 above spits out "...else!" on the CLI, so
I know that the RJS file is being processed.
428 describe 'with views integrated' do
431 it 'should hide the map filter errors <div>' do
432 do_xhr @xhr_params
433 response.should have_rjs
434 # response.should have_rjs(:hide, 'map-filter-errors')
Why might line 433 above fail?:
$ script/spec -e 'should hide the map filter errors <div>' spec/
'NeighbourhoodsController handling POST /neighbourhoods/map_filter if
a filter error occured with views integrated should hide the map
filter errors <div>' FAILED
No RJS statement that replaces or inserts HTML content.
Finished in 0.489336 seconds
1 example, 1 failure
More information about the rspec-users