remarkable + before_filter

26 views
Skip to first unread message

FoxDemon

unread,
Apr 23, 2010, 12:05:15 PM4/23/10
to Remarkable
How do I test a before_filter with remarkable? Without remarable I
would do something like:
controller.stub(:logged_in?).and_return(true)
But with remarkable this results in:
undefined local variable or method `controller' for #<Class:
0x7f8f056ef3c0> (NameError)


Thanks in advance


--
You received this message because you are subscribed to the Google Groups "Remarkable" group.
To post to this group, send email to remarka...@googlegroups.com.
To unsubscribe from this group, send email to remarkable-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/remarkable-core?hl=en.

Sébastien Nicouleaud

unread,
Apr 23, 2010, 1:25:33 PM4/23/10
to remarka...@googlegroups.com
I think this should work:

expects :logged_in?, :on => proc { @controller }, :returns => true


Seb

FoxDemon

unread,
Apr 23, 2010, 1:33:58 PM4/23/10
to Remarkable
Indeed it does, thanks.

On Apr 23, 7:25 pm, Sébastien Nicouleaud
<sebastien.nicoule...@gmail.com> wrote:
> I think this should work:
>
> expects :logged_in?, :on => proc { @controller }, :returns => true
>
> Seb
>
> Le vendredi 23 avril 2010 à 09:05 -0700, FoxDemon a écrit :
>
> > How do I test a before_filter with remarkable? Without remarable I
> > would do something like:
> >  controller.stub(:logged_in?).and_return(true)
> > But with remarkable this results in:
> > undefined local variable or method `controller' for #<Class:
> > 0x7f8f056ef3c0> (NameError)
>
> > Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups "Remarkable" group.To post to this group, send email toremark...@googlegroups.com.To unsubscribe from this group, send email toremarkable-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages