Hi,

I have a view that generates some code (in this case CSS) based on the 
values passed to it, e.g.:

    <% content_for :head do %>
    <style>
        .someClass { background: <%= @color %>; }
    </style>
    <% end %>

    <div>
        Some content blah.
    </div>

I would like to test that .someClass with proper color is generated, but 
the problem is that when I do something like this in my spec:

    render
    rendered.should =~ /\.someClass/

it fails because nothing from the `content_for` block is included in 
`rendered`. How can I get to it? Is there any way?

Thanks,
Juliusz

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rspec/-/grRzBkidtzgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rspec?hl=en.

Reply via email to