Sha256: 8658bebd66155b330307f78d93df13a8df97bc55c2d70780b1b9c2b3c3a148e8

Contents?: true

Size: 917 Bytes

Versions: 5

Compression:

Stored size: 917 Bytes

Contents

require 'coveralls'
Coveralls.wear!

require 'stringio'
RSpec.configure do |c|
  def capture(stream)
    begin
      stream = stream.to_s
      eval "$#{stream} = StringIO.new"
      yield
      result = eval("$#{stream}").string
    ensure
      eval "$#{stream} = #{stream.upcase}"
    end
    result
  end
end


require 'airplay'
Airplay.configure do |c|
  c.autodiscover = false
end

# https://github.com/elcuervo/airplay/blob/master/lib/airplay/device.rb
# https://github.com/elcuervo/airplay/blob/master/lib/airplay/device/info.rb
def double_device
  device = Airplay::Device.new(name: 'Double Device', address: 'double.appletv.local:7000')
  allow(device).to receive('ip').and_return('127.0.0.1')
  allow(device).to receive('server_info').and_return({
    'model'      => 'AppleTV2,1',
    'os_version' => '11B554a',
    'width'      => '1280',
    'height'     => '720'
  })
  device
end

require 'airplayer'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
airplayer-1.0.1 spec/spec_helper.rb
airplayer-1.0.0 spec/spec_helper.rb
airplayer-1.0.0.pre spec/spec_helper.rb
airplayer-0.1.0 spec/spec_helper.rb
airplayer-0.0.9 spec/spec_helper.rb