[rspec-users] undefined method `assert_select'
Sarah Allen
lists at ruby-forum.com
Sat May 23 14:18:00 EDT 2009
Sarah Allen wrote:
> line 17 is:
> html.should have_tag('script', /swfobject.embedSWF/)
I order to use have_tag, it appears I have to include:
# just enough infrastructure to get 'assert_select' to work
require 'action_controller'
require 'action_controller/assertions/selector_assertions'
include ActionController::Assertions::SelectorAssertions
borrowed from: http://intertwingly.net/stories/2009/05/06/checkdepot.rb
Odd, because it seems like this used to work without that in a previous
version of Rails, but I would need to investigate more to isolate what
went wrong. I figured I would go ahead and post this as something that
works.
Sarah
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list