collectiveidea / json_spec

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

inline vs row for have_json_type #29

Closed awesome closed 12 years ago

awesome commented 12 years ago

I have some static keys with dynamic values:

    And the JSON at "data/pgdb_ms" should be a fixnum # json_spec-1.0.3/lib/json_spec/cucumber.rb:81
    And the JSON should have the following:           # json_spec-1.0.3/lib/json_spec/cucumber.rb:61
      | data/pgdb_ms | a fixnum                  |
      756: unexpected token at 'a fixnum' (MultiJson::DecodeError)

I should probably submit a patch… thought I should mention it first and see if I'm not reading the manual correctly.

laserlemon commented 12 years ago

The table step that you're using doesn't accept data types in the second column. Rather, it accepts JSON values. Although it would be interesting to open that step up to type matching. Please investigate if you're still interested.

laserlemon commented 12 years ago

And thank you! :clap: