Skip to content

Adding loose comparison -- code, and pull request if interested. #50

@jejacks0n

Description

@jejacks0n

I wanted a loose comparison type of thing so I threw one together. I'm wondering if this is a feature worth implementing, and if so, I'll submit a pull request with proper specs and an adjusted matcher name -- if not someone else might find this useful.

gist: https://gist.github.com/jejacks0n/6384919

This allows specifying attributes that you want to ensure are there, but that you don't really care about the value of by using a wildcard (*).

eg.

expect(response_body).to look_like <<-JSON
  {
    "access_token": "*",
    "token_type": "bearer",
  }
JSON

Thoughts / feelings? If it's something worth adding, what would you like me to change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions