Sha256: 7378a92ce3acfdd24a2b42bed78c13152f5af7a45e1d18cc769145cd8f78f7c5

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

if RUBY_VERSION.start_with?('2')
  require 'byebug'
else
  require 'debugger'
end
require 'rspec'
require 'rspec/core'
require 'rspec/mocks'
require 'upload'
require File.expand_path('../../lib/fastdfs-client', __FILE__)
require File.expand_path('../test_config', __FILE__)
require File.expand_path('../mock_tcp_socket', __FILE__)

Fastdfs::Client.class_eval do 
  def self.mock_test; true end
end 

FC = Fastdfs::Client

RSpec.configure do |config|
  config.before(:each) do 
    TCPSocket.stub(:new) do |h, p|
      MockTCPSocket.new(h, p)
    end
  end
  config.mock_with :rspec do |c|
    c.syntax = [:should, :expect]
  end
end
  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastdfs-client-2.0.0 spec/spec_helper.rb