# What's diffrence between ({:these=\>"params"}) and ({"these"

**URL:** <https://www.ruby-forum.com/t/whats-diffrence-between-these-params-and-these/150513>\
**Category:** Rails\
**Created:** [October 9, 2008, 11:05am UTC](https://www.ruby-forum.com/t/whats-diffrence-between-these-params-and-these/150513 "2008-10-09T11:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guofeng](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/839c29/32.png) [@guofeng](https://www.ruby-forum.com/u/guofeng)\
**Post date:** [October 9, 2008, 11:05am UTC](https://www.ruby-forum.com/t/whats-diffrence-between-these-params-and-these/150513/1 "2008-10-09T11:05:13Z")

</div>

When i use rspec(with built-in mock framework) ,error occurs.  
I use rspec\_scaffold generate a example as below:

```
  it "should expose a newly created awarding_body as @awarding_body"

```

do  
AwardingBody.should\_receive(:new).with(:these  
=\>‘params’).and\_return(mock\_awarding\_body(:save  
=\> true))

```
     post :create, :awarding_body => {:these => 'params'}
    assigns(:awarding_body).should == (mock_awarding_body)
  end

```

After execute the example , a error occurs as below :

Mock ‘Class’ expected :new with ({:these=\>“params”}) but received it  
with ({“the  
se”=\>“params”})

---

<div class="post-metadata">

**Author:** ![guofeng](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/839c29/32.png) [@guofeng](https://www.ruby-forum.com/u/guofeng)\
**Post date:** [October 9, 2008, 11:09am UTC](https://www.ruby-forum.com/t/whats-diffrence-between-these-params-and-these/150513/2 "2008-10-09T11:09:33Z")

</div>

On 9 Oct 2008, at 10:05, Guofeng Ma wrote:

> Mock ‘Class’ expected :new with ({:these=\>“params”}) but received it  
> with ({“the  
> se”=\>“params”})

Probably because actioncontroller magics the params hash into a hash  
with string keys, not symbol keys.

Fred
