Hi, I have a question about writing scenarios in cucumber that include a
JSON.
I have the following scenario in cucumber:

Scenario Outline:
  Given I send and accept JSON
  And I send a POST request to <path> with the following:
  """
   {
    "field1":"text",
    "emails":[
        {
            "work":"t...@test.com",
            "private":"h...@test.com",
        },
    ]
   }
   """
  Then The response status should be "200"

Examples:
| path  |
| /req  |

I want the JSON to be in the examples, so that I can run the scenario 
several times with different JSONs and verify that I get the correct 
response status.
I want the scenario to look something like this:

Scenario Outline:
  Given I send and accept JSON
  And I send a POST request to <path> with the following:
  """
   <JSON>
   """
  Then The response status should be "200"

how do I add the JSON to the examples?

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to