collectiveidea / json_spec

Easily handle JSON in RSpec and Cucumber
rubygems.org/gems/json_spec
MIT License
919 stars 114 forks source link

Added have_json_type_boolean matcher and relative cucumber step. #10

Closed mcollina closed 12 years ago

mcollina commented 13 years ago

See https://github.com/collectiveidea/json_spec/issues/7.

crimsonknave commented 12 years ago

Any chance of getting this pulled in? I'd love to get some sort of boolean testing.

laserlemon commented 12 years ago

I'm alive. While I'm generally not fond of exceptions to the rule, a boolean matcher does seem useful. However, I'm not wild about this implementation. Rather than creating a whole new matcher, I'd like to extend the type matcher to allow for a :boolean or "boolean" argument. I think that could also clean up the change to the Cucumber step.

@mcollina Are you interested in taking a stab at this or shall I? Thanks for your contribution and sorry for my slowness!

laserlemon commented 12 years ago

I just released version 1.0.0 with boolean matcher support. Instead of creating a new matcher, I made the existing type matcher more flexible in the arguments it accepts, including :boolean. Thanks for the suggestion!

mcollina commented 12 years ago

Thanks!