From 20d2e66bb4d14809070ccc0fd8e521f916d41170 Mon Sep 17 00:00:00 2001 From: Seb Ashton Date: Tue, 13 Sep 2016 12:58:55 +0100 Subject: [PATCH] If version cake defined add the helpers --- spec/spec_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cbc8125a..966b7982 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -59,6 +59,14 @@ config.include Spree::Api::TestingSupport::Helpers, type: :controller config.include Spree::Api::TestingSupport::Setup, type: :controller + if Object.const_defined?('VersionCake') + config.include VersionCake::TestHelpers, type: :controller + + config.before(:each, type: :controller) do + set_request_version('', 1) + end + end + config.before(:suite) do DatabaseCleaner.clean_with(:truncation) end