[rspec-users] Can NOT overides the stub! in the setup
dchelimsky at gmail.com
Mon Sep 10 22:52:55 EDT 2007
On 9/10/07, bruce zuo <brucezuo at gmail.com> wrote:
> 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:
> before(:each) do
> @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?
What's the error that you get when you use double quotes?
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users