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:
parent
30d90368f6
commit
350d153873
15 changed files with 46 additions and 47 deletions
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::ConnectionAdapter do
|
||||
describe "initialization" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::CookieHash do
|
||||
before(:each) do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Error do
|
||||
subject { described_class }
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::HashConversions do
|
||||
describe ".to_params" do
|
||||
it "creates a params string from a hash" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Logger::ApacheFormatter do
|
||||
let(:subject) { described_class.new(logger_double, :info) }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Logger::CurlFormatter do
|
||||
describe "#format" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Logger do
|
||||
describe ".build" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Net::HTTPHeader::DigestAuthenticator do
|
||||
def setup_digest(response)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Parser do
|
||||
describe ".SupportedFormats" do
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'spec_helper'
|
||||
require 'tempfile'
|
||||
|
||||
describe HTTParty::Request::Body do
|
||||
RSpec.describe HTTParty::Request::Body do
|
||||
describe '#call' do
|
||||
subject { described_class.new(params).call }
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Request do
|
||||
before do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Response do
|
||||
before do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe HTTParty::Request do
|
||||
context "SSL certificate verification" do
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
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 }
|
||||
|
|
|
@ -38,8 +38,6 @@ RSpec.configure do |config|
|
|||
config.order = :random
|
||||
|
||||
Kernel.srand config.seed
|
||||
|
||||
config.expose_dsl_globally = true
|
||||
end
|
||||
|
||||
RSpec::Matchers.define :use_ssl do
|
||||
|
|
Loading…
Add table
Reference in a new issue