spec/spec_helper.rb in conjur-cli-2.4.1 vs spec/spec_helper.rb in conjur-cli-2.6.0

- old
+ new

@@ -1,8 +1,9 @@ require "rubygems" require "bundler/setup" require 'tempfile' +require 'ostruct' require "simplecov" SimpleCov.start module RSpec::Core::DSL @@ -55,9 +56,19 @@ end end shared_context "when not logged in", logged_in: false do include_context "with mock authn" +end + + +def post_response(id, attributes = {}) + attributes[:id] = id + + OpenStruct.new({ + headers: { location: [ collection_url, id ].join('/') }, + body: attributes.to_json + }) end require 'write_expectation' require 'conjur/cli'