[rspec-users] Can NOT overides the stub! in the setup
brucezuo at gmail.com
Mon Sep 10 22:47:50 EDT 2007
I am new to rSpec. I tried to search in the list, but could not find
the answer, please forgive me if somebody already answered this. Here
is my question:
I have a stub in setup:
@current_user = mock("devsu")
# Generally, prefer stub! over should_receive in setup.
session[:user] = @current_user.id
Where User is a model.
Then I tried to overrides it within a spec in a rails CONTROLLER specs:
it "descriptions...." do
get 'show', :id => 3
I found only '3', that is right, only single quotes can overrides the
stub! in setup, the "3", double quotes won't work. I am wondering if
this is the way how it works?
More information about the rspec-users