Questions tagged [json-spec]

json_spec is a Ruby gem that makes it easier to work with testing API's via Cucumber and RSpec The json_spec gem is a collection of RSpec matchers and a collection of Cucumber steps to wrap them up.

The json_spec gem is a collection of RSpec matchers and a collection of Cucumber steps to wrap them up. It was designed to make it easier to do API testing using Cucumber. This blog post introduces the gem. The readme file goes into more examples and details as to its use. The gem can be downloaded from rubygems, and the source is on github

3 questions
1
vote
1 answer

How do you use paths in "json_spec" gem if you have no arrays?

I'm using the "json_spec" gem in a Rails app and I'm trying to create some Cucumber steps to document/test my API code. I have the following scenario: Scenario: Create new authorization Given an existing user and merchant When I post to…
MikeH
  • 796
  • 7
  • 18
1
vote
1 answer

Using json_spec gem's 'at "path" should include:' step is not working as I would expect

(apologies in advance for the cucumber steps, they need to be cleaned up a fair bit to flow better) I am using a combination of Cucumber, along with the rest-client, and json_spec gems to create a test suite for a restful API. The approach is…
Chuck van der Linden
  • 6,660
  • 2
  • 28
  • 43
1
vote
1 answer

JSON specification for empty objects

This question is more related to standards and conventions and is closely related to this. We had a JSON contract established between two different groups, namely UI team dealing with React based framework and Server team developing REST services in…
Vijayan K
  • 63
  • 1
  • 10