Skip to content

Instantly share code, notes, and snippets.

@gonzedge
Created November 11, 2011 01:48
Show Gist options
  • Save gonzedge/1356909 to your computer and use it in GitHub Desktop.
Save gonzedge/1356909 to your computer and use it in GitHub Desktop.
Rails 3.1 and the assert_select_jquery
if($('#container').is(':not(:visible)')) $('#container').show('blind', 1000);
$('#container').html('<%= render @content %>');
var container = $('#container');
if(container.is(':not(:visible)')) container.show('blind', 1000);
container.html('<%= render @content %>')
test 'the container html is replaced when rendered' do
assert_select_jquery :html, '#container'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment