Skip to content

Commit

Permalink
add spec feature flags since patron is strict
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Feb 21, 2019
1 parent 6cf1ab3 commit 95125f6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions spec/faraday/adapter/excon_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSpec.describe Faraday::Adapter::Excon do
features :body_on_get, :reason_phrase_parse
features :body_on_get, :reason_phrase_parse, :trace_method, :connect_method

it_behaves_like 'an adapter'

Expand All @@ -12,4 +12,4 @@

expect(conn.data[:debug_request]).to be_truthy
end
end
end
4 changes: 2 additions & 2 deletions spec/faraday/adapter/httpclient_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSpec.describe Faraday::Adapter::HTTPClient do
features :body_on_get, :reason_phrase_parse, :compression
features :body_on_get, :reason_phrase_parse, :compression, :trace_method, :connect_method

it_behaves_like 'an adapter'

Expand Down Expand Up @@ -30,4 +30,4 @@
expect(conn.options[:bind][:host]).to eq(host)
expect(conn.options[:bind][:port]).to eq(port)
end
end
end
2 changes: 1 addition & 1 deletion spec/faraday/adapter/net_http_persistent_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSpec.describe Faraday::Adapter::NetHttpPersistent do
features :body_on_get, :reason_phrase_parse, :compression
features :body_on_get, :reason_phrase_parse, :compression, :trace_method, :connect_method

it_behaves_like 'an adapter'

Expand Down
4 changes: 2 additions & 2 deletions spec/faraday/adapter/net_http_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSpec.describe Faraday::Adapter::NetHttp do
features :body_on_get, :reason_phrase_parse, :compression, :streaming
features :body_on_get, :reason_phrase_parse, :compression, :streaming, :trace_method, :connect_method

it_behaves_like 'an adapter'

Expand Down Expand Up @@ -45,4 +45,4 @@
end
end
end
end
end
4 changes: 2 additions & 2 deletions spec/faraday/adapter/typhoeus_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RSpec.describe Faraday::Adapter::Typhoeus do
features :body_on_get, :parallel
features :body_on_get, :parallel, :trace_method, :connect_method

it_behaves_like 'an adapter'
end
end
16 changes: 10 additions & 6 deletions spec/support/shared_examples/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@
expect(request_stub).to have_been_requested unless request_stub.disabled?
end

describe '#connect' do
let(:http_method) { :connect }
on_feature :connect_method do
describe '#connect' do
let(:http_method) { :connect }

it_behaves_like 'a request method', :connect
it_behaves_like 'a request method', :connect
end
end

describe '#delete' do
Expand Down Expand Up @@ -98,9 +100,11 @@
it_behaves_like 'a request method', :put
end

describe '#trace' do
let(:http_method) { :trace }
on_feature :trace_method do
describe '#trace' do
let(:http_method) { :trace }

it_behaves_like 'a request method', :trace
it_behaves_like 'a request method', :trace
end
end
end

0 comments on commit 95125f6

Please sign in to comment.