1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Make use of RSpec DSL consistent across specs

This commit is contained in:
Zachary Herr 2018-08-27 09:41:31 -05:00
parent 30d90368f6
commit 350d153873
15 changed files with 46 additions and 47 deletions

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::ConnectionAdapter do RSpec.describe HTTParty::ConnectionAdapter do
describe "initialization" do describe "initialization" do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::CookieHash do RSpec.describe HTTParty::CookieHash do
before(:each) do before(:each) do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Error do RSpec.describe HTTParty::Error do
subject { described_class } subject { described_class }

View file

@ -1,3 +1,5 @@
require 'spec_helper'
RSpec.describe HTTParty::HashConversions do RSpec.describe HTTParty::HashConversions do
describe ".to_params" do describe ".to_params" do
it "creates a params string from a hash" do it "creates a params string from a hash" do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Logger::ApacheFormatter do RSpec.describe HTTParty::Logger::ApacheFormatter do
let(:subject) { described_class.new(logger_double, :info) } let(:subject) { described_class.new(logger_double, :info) }

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Logger::CurlFormatter do RSpec.describe HTTParty::Logger::CurlFormatter do
describe "#format" do describe "#format" do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Logger do RSpec.describe HTTParty::Logger do
describe ".build" do describe ".build" do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe Net::HTTPHeader::DigestAuthenticator do RSpec.describe Net::HTTPHeader::DigestAuthenticator do
def setup_digest(response) def setup_digest(response)

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Parser do RSpec.describe HTTParty::Parser do
describe ".SupportedFormats" do describe ".SupportedFormats" do

View file

@ -1,6 +1,7 @@
require 'spec_helper'
require 'tempfile' require 'tempfile'
describe HTTParty::Request::Body do RSpec.describe HTTParty::Request::Body do
describe '#call' do describe '#call' do
subject { described_class.new(params).call } subject { described_class.new(params).call }

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Request do RSpec.describe HTTParty::Request do
before do before do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Response do RSpec.describe HTTParty::Response do
before do before do

View file

@ -1,4 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require 'spec_helper'
RSpec.describe HTTParty::Request do RSpec.describe HTTParty::Request do
context "SSL certificate verification" do context "SSL certificate verification" do

View file

@ -1,6 +1,4 @@
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper')) RSpec.describe HTTParty do
describe HTTParty do
before(:each) do before(:each) do
@klass = Class.new @klass = Class.new
@klass.instance_eval { include HTTParty } @klass.instance_eval { include HTTParty }

View file

@ -38,8 +38,6 @@ RSpec.configure do |config|
config.order = :random config.order = :random
Kernel.srand config.seed Kernel.srand config.seed
config.expose_dsl_globally = true
end end
RSpec::Matchers.define :use_ssl do RSpec::Matchers.define :use_ssl do