[rspec-users] Troble running controller spec

Amit Kulkarni
Mon, 08 Jun 2009 14:48:37 -0000

David Chelimsky wrote:
> On Mon, Jun 8, 2009 at 8:31 AM, Amit Kulkarni<lists at
ruby-forum.com>
> wrote:
>>> I *think* Rails converts the keys in this hash to strings. Try:
>>
>>      Channel.should_receive(:new).with(''brand_name''
=> ''manager''
>> ).and_return(@channel)
>>      post :create, :channel => {''brand_name'' =>
''manager'' }
>>    end
>>
>>    it "should save channel" do
>>      @channel.should_receive(:save)
>>      post :create
>>    end
>>  end
>
> I went as far as to create a rails 2.1.2 project with rspec and
> rspec-rails 1.2.4, copy your code into it and ran the specs. They both
> pass. I don''t have a Vista environment in which to test this, so
> that''s all I can do to help at the moment.
>
> Anybody else running into similar problems on Vista?
>

Thanks a lot for looking into the matter.I am not sure if i am getting
this problem due to vista environment.If it is then i dont know what to
do :-(

Also i didnt understand b the statement
"create a rails 2.1.2 project with rspec and rspec-rails 1.2.4, copy
your code into it and ran the specs."

Also i checked my spec version it is 1.2.6,so does this causing the
problem.
This version got updated from 1.2.4.
Please suggest.