mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
Replace describe with RSpec.describe
Disabled monkey patching
This commit is contained in:
parent
ed8a9acf6a
commit
b72b212767
11 changed files with 11 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::ConnectionAdapter do
|
||||
RSpec.describe HTTParty::ConnectionAdapter do
|
||||
|
||||
describe "initialization" do
|
||||
let(:uri) { URI 'http://www.google.com' }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))
|
||||
|
||||
describe HTTParty::CookieHash do
|
||||
RSpec.describe HTTParty::CookieHash do
|
||||
before(:each) do
|
||||
@cookie_hash = HTTParty::CookieHash.new
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Error do
|
||||
RSpec.describe HTTParty::Error do
|
||||
subject { described_class }
|
||||
|
||||
describe '#ancestors' do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Logger::ApacheLogger do
|
||||
RSpec.describe HTTParty::Logger::ApacheLogger do
|
||||
let(:subject) { described_class.new(logger_double, :info) }
|
||||
let(:logger_double) { double('Logger') }
|
||||
let(:request_double) { double('Request', http_method: Net::HTTP::Get, path: "http://my.domain.com/my_path") }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Logger::CurlLogger do
|
||||
RSpec.describe HTTParty::Logger::CurlLogger do
|
||||
describe "#format" do
|
||||
it "formats a response in a style that resembles a -v curl" do
|
||||
logger_double = double
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Logger do
|
||||
RSpec.describe HTTParty::Logger do
|
||||
describe ".build" do
|
||||
subject { HTTParty::Logger }
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe Net::HTTPHeader::DigestAuthenticator do
|
||||
RSpec.describe Net::HTTPHeader::DigestAuthenticator do
|
||||
def setup_digest(response)
|
||||
digest = Net::HTTPHeader::DigestAuthenticator.new("Mufasa",
|
||||
"Circle Of Life", "GET", "/dir/index.html", response)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Parser do
|
||||
RSpec.describe HTTParty::Parser do
|
||||
describe ".SupportedFormats" do
|
||||
it "returns a hash" do
|
||||
expect(HTTParty::Parser::SupportedFormats).to be_instance_of(Hash)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Request do
|
||||
RSpec.describe HTTParty::Request do
|
||||
before do
|
||||
@request = HTTParty::Request.new(Net::HTTP::Get, 'http://api.foo.com/v1', format: :xml)
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
|
||||
describe HTTParty::Response do
|
||||
RSpec.describe HTTParty::Response do
|
||||
before do
|
||||
@last_modified = Date.new(2010, 1, 15).to_s
|
||||
@content_length = '1024'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
|
||||
|
||||
describe HTTParty do
|
||||
RSpec.describe HTTParty do
|
||||
before(:each) do
|
||||
@klass = Class.new
|
||||
@klass.instance_eval { include HTTParty }
|
||||
|
|
Loading…
Add table
Reference in a new issue