From eb62ab96ff003f12a1749793782946c63f2fe56f Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Sun, 3 May 2015 20:14:08 +0000 Subject: [PATCH] Improve status code expectation in json UAT helper --- spec/support/acceptance_helpers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/acceptance_helpers.rb b/spec/support/acceptance_helpers.rb index 8ba6bc4..52fe785 100644 --- a/spec/support/acceptance_helpers.rb +++ b/spec/support/acceptance_helpers.rb @@ -40,8 +40,8 @@ module AcceptanceHelpers end end - def json - expect(response).to be_success + def json status = 200 + expect(response.status).to be status JSON.parse(response.body, symbolize_names: true) end end