diff --git a/test/cucumber/step_definitions/body_steps.coffee b/test/cucumber/step_definitions/body_steps.coffee index 9e658efc..c031b743 100644 --- a/test/cucumber/step_definitions/body_steps.coffee +++ b/test/cucumber/step_definitions/body_steps.coffee @@ -1,13 +1,18 @@ module.exports = -> @Given /^you define expected HTTP body using the following "([^"]*)":$/, (type, body, callback) -> - if type == "textual example" + if type == 'JSON schema' + @expected.bodySchema = JSON.parse(body) + else @expected.body = body - else if type == "JSON example" - @expected.body = body - else if type == "JSON schema" - @expected.bodySchema = JSON.parse body + callback() + + @Given /^you define expected HTTP body as empty$/, (callback) -> + @expected.body = '' + callback() + @Given /^real HTTP body is empty$/, (callback) -> + @real.body = '' callback() @When /^real HTTP body is following:$/, (body, callback) ->