Skip to content

hash_including stringifies keys #43

Open
@cjbottaro

Description

The following code...

      mock(Reference).create(hash_including(:name => "Chris", :requested_email => "blah@blah.com")) do
        OpenStruct.new(:id => 123)
      end

Fails with this error message...

expected invocations:
       - create(hash_including({"name"=>"Chris", "requested_email"=>"blah@blah.com"}))

Notice that when I call hash_including, I use symbols, but then RR changes them to strings.

I'm using version 1.1.1, Rails 3.2.13, rspec-rails 2.12.2.

Thanks.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions