Skip to content

Commit

Permalink
spec: show info about api clients on before block
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Dec 18, 2018
1 parent 8bba857 commit 6eb1e82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/integration/import_openapi_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require '3scale_toolbox'

RSpec.shared_context :import_oas_stubbed_api3scale_client do
puts '============ RUNNING STUBBED 3SCALE API CLIENT =========='
let(:internal_http_client) { double('internal_http_client') }
let(:http_client_class) { class_double('ThreeScale::API::HttpClient').as_stubbed_const }

Expand Down Expand Up @@ -54,6 +53,7 @@
end

before :example do
puts '============ RUNNING STUBBED 3SCALE API CLIENT =========='
##
# Internal http client stub
allow(internal_http_client).to receive(:post).with('/admin/api/services', anything)
Expand Down
6 changes: 4 additions & 2 deletions spec/shared_contexts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def get_plugin_content(command_class_name, command_name)
RSpec.shared_context :real_api3scale_client do
include_context :allow_net_connect

puts '================ RUNNING REAL 3SCALE API CLIENT ========='

let(:endpoint) { ENV.fetch('ENDPOINT') }

let(:provider_key) { ENV.fetch('PROVIDER_KEY') }
Expand All @@ -74,4 +72,8 @@ def get_plugin_content(command_class_name, command_name)
verify_ssl: verify_ssl)
end
let(:api3scale_client) { ThreeScale::API::Client.new(http_client) }

before :example do
puts '================ RUNNING REAL 3SCALE API CLIENT ========='
end
end

0 comments on commit 6eb1e82

Please sign in to comment.