[rspec-users] undefined method `assert_select'

David Chelimsky dchelimsky at gmail.com
Sun May 24 18:05:37 EDT 2009


On Sun, May 24, 2009 at 3:20 PM, Sarah Allen <lists at ruby-forum.com> wrote:
> Sarah Allen wrote:
>> 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
>
> I just worked on this a bit with RailsBridge mentor, Zach Moazeni, who
> figured out that the problem was that I had not specifies a type for my
> view helper example group:
>
> describe SwfObjectHelper, :type => :helper do

FYI - if you put this file in spec/helpers/swf_object_helper_spec.rb,
then :type => :helper is implied, so you don't have to make it
explicit.

Cheers,
David

>
> I thought I would post it here in case anyone else runs into the same
> issue.
>
> Sarah
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list