Sha256: bcd093ba1d12d275757db058dab490c3ac42b1d27e789f6f4edb8d90bbb051d6

Contents?: true

Size: 1.27 KB

Versions: 13

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

require 'active_support'
require 'evostream/event'
require 'faker'
require 'json'
require 'webmock/rspec'

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

Dir['spec/support/**/*.rb'].each do |f|
  require File.expand_path(f)
end

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  # Exclude spec broken
  config.filter_run_excluding broken: true

  # Configure Service DSL
  config.before do
    Evostream::Service.configuration do |c|
      c.uri_in     = 'http://server_stream.local:80'
      c.uri_out    = 'http://server_stream.local:7777'
      c.name       = 'srteamming_'
      c.web_root   = '/var/www/html'
      c.model      = Test
      c.model_id   = :identifier_used_in_model
    end
  end

  # Disable all remote connections
  WebMock.disable_net_connect!(allow_localhost: true)

  # Configure test Net::HTTP
  config.before(:each, type: :request) do
    stub_request(:get, /server_stream.local/)
      .with(headers: { 'Accept': '*/*', 'User-Agent': 'Ruby' })
      .to_return(status: 200, body: '', headers: {})
  end
end

# Class for testing
class Test
  def self.find_by(id)
    id
  end
end

# Class for testing model stream
class Hls; end

# Class for testing model stream
class Dash; end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
evostream-event-0.2.5 spec/spec_helper.rb
evostream-event-0.2.5.pre.35 spec/spec_helper.rb
evostream-event-0.2.5.pre.34 spec/spec_helper.rb
evostream-event-0.2.4 spec/spec_helper.rb
evostream-event-0.2.4.pre.31 spec/spec_helper.rb
evostream-event-0.2.3 spec/spec_helper.rb
evostream-event-0.2.3.pre.27 spec/spec_helper.rb
evostream-event-0.2.2 spec/spec_helper.rb
evostream-event-0.2.2.pre.25 spec/spec_helper.rb
evostream-event-0.2.1 spec/spec_helper.rb
evostream-event-0.2.1.pre.23 spec/spec_helper.rb
evostream-event-0.2.0.pre.22 spec/spec_helper.rb
evostream-event-0.1.2.pre.20 spec/spec_helper.rb