[rspec-users] Hash / params causing errors

Ramon Tayag ramon.tayag at gmail.com
Thu Nov 6 21:53:29 EST 2008


Hey everyone,

I'm trying to spec a controller and I can't seem to get a test to pass
because rspec seems to see the difference between params I expect and
params that I pass.  However, this comes from the same params
variable.  What should I do to get this to work?

Spec::Mocks::MockExpectationError in 'UsersController handling POST
/users should create a new user from params'
Mock 'Class' expected :new with ({:email=>"user at email.com"}) but
received it with ({"email"=>"user at email.com"})

Code is here: http://pastie.org/309263

Thanks!
Ramon Tayag


More information about the rspec-users mailing list