On 7/4/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
>
> Hi Don,
>
> Thanks for the tip! That looks like a great way to handle this case.
>
> So what does everybody think, is this the definitive answer for setting
> instance variables in your views? (use a helper) or are their cases where we
>
Hi Don,
Thanks for the tip! That looks like a great way to handle this case.
So what does everybody think, is this the definitive answer for setting
instance variables in your views? (use a helper) or are their cases
where we may still want to check instance variables in view specs?
Cheers!
I can sympathize with not wanting to just verify the final html
output, even though it would probably be sufficient in this simple case.
I'm a big fan of helpers for any logic in views, even simple stuff
like this. If you had a couple of methods in your ApplicationHelper
that handled settin
David Chelimsky wrote:
On 7/4/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
aslak hellesoy wrote:
On 7/3/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
Hi,
I think @header may not be an implementation detail in this case.
If your layout looks like this:
...
<%= @header || 'Defa
On 7/4/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
>
> aslak hellesoy wrote:
> On 7/3/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I think @header may not be an implementation detail in this case.
>
> If your layout looks like this:
>
> ...
>
> <%= @header || 'Default Ti
aslak hellesoy wrote:
On 7/3/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
Hi,
I think @header may not be an implementation detail in this case.
If your layout looks like this:
...
<%= @header || 'Default Title' %>
...
And the view we are testing looks like this:
...
<%= @h
On 7/3/07, Patrick Ritchie <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think @header may not be an implementation detail in this case.
>
> If your layout looks like this:
>
> ...
>
> <%= @header || 'Default Title' %>
>
> ...
>
> And the view we are testing looks like this:
>
> ...
> <%= @
Hi,
I think @header may not be an implementation detail in this case.
If your layout looks like this:
...
<%= @header || 'Default Title' %>
...
And the view we are testing looks like this:
...
<%= @header = 'Specific Title'>
...
Then setting @header is an essential behavior for the view sp
Quoting David Chelimsky <[EMAIL PROTECTED]>:
>>>
>> Thanks Aslak, I wondered this myself. I looked around here :
>> http://rspec.rubyforge.org/rdoc/index.html for have_tag but didn't find
>> it.
>>
>> Where would be a good place to find some of these matchers?
>
> have_tag is not part of rspec's
On 6/30/07, barsalou <[EMAIL PROTECTED]> wrote:
> Quoting aslak hellesoy <[EMAIL PROTECTED]>:
>
> > @header is an implementation detail of your view that you shouldn't
> > care about in your view spec at all. I recommend you use the have_tag
> > matcher instead to verify what content gets rendered
Quoting aslak hellesoy <[EMAIL PROTECTED]>:
> @header is an implementation detail of your view that you shouldn't
> care about in your view spec at all. I recommend you use the have_tag
> matcher instead to verify what content gets rendered as expected.
>
> Aslak
>
Thanks Aslak, I wondered this m
@header is an implementation detail of your view that you shouldn't
care about in your view spec at all. I recommend you use the have_tag
matcher instead to verify what content gets rendered as expected.
Aslak
On 6/29/07, Jeremy Stephens <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> In my view specs (
12 matches
Mail list logo