Hermine D.
Hermine D.

Reputation: 1149

rspec + remarkable + before_filter

How do I test before_filter with rspec and remarkable. With only rspec 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)

Upvotes: 1

Views: 606

Answers (1)

Hermine D.
Hermine D.

Reputation: 1149

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

(solution found here)

Upvotes: 1

Related Questions