8000 Support `anything` in nested data structures · Issue #405 · marick/Midje · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Support anything in nested data structures #405
Open
@pjlegato

Description

@pjlegato

Would it be possible to extend anything support so it can be used in maps nested within a sequence?

We often have to check a function that returns a sequence of maps (e.g. JDBC queries that return a sequence of map rows). In many cases, we don't care about the exact value of some map value, such as autogenerated SERIAL IDs.

This test passes:

(fact "this passes"   {:x 1, :y 1} => (just {:x anything, :y anything}))

But this version, where the map is wrapped in a vector, fails:

(fact "this fails"   [{:x 1, :y 1}] => (just [{:x anything, :y anything}]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0