Giter VIP home page Giter VIP logo

Comments (6)

malcolmsparks avatar malcolmsparks commented on July 30, 2024

I found this when playing around with ring-spec - which is great btw. Is ring-mock deprecated now or does it just need a fix? Happy to send a PR.

from ring-mock.

malcolmsparks avatar malcolmsparks commented on July 30, 2024

Also, :query-string is generated as nil, which fails the spec.

(s/explain-str :ring/request (assoc (request :get "/") :protocol "HTTP/1.1"))
=>
In: [:query-string] val: nil fails spec: :ring.request/query-string at: [:query-string] predicate: :clojure.spec/unknown

from ring-mock.

weavejester avatar weavejester commented on July 30, 2024

Needs a fix, I think! Ring-Mock is still useful for creating non-generative request maps. The :query-string key should probably be missing if it's not set.

from ring-mock.

malcolmsparks avatar malcolmsparks commented on July 30, 2024

I don't know how you feel about the ring-mock project now, given that equivalent functionality could eventually form part of the ring-spec project (via generators). Personally, I like ring-mock and think it's worth keeping up-to-date. Feel free to delegate to me if you like, but I think the fixes are fairly trivial.

from ring-mock.

weavejester avatar weavejester commented on July 30, 2024

As far as I know, generators aren't designed for creating specific data structures, so Ring-Mock is still useful for creating non-generative request maps.

from ring-mock.

jcf avatar jcf commented on July 30, 2024

This should be fixed now that #12 has been merged.

from ring-mock.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.