Sha256: eda9278cfbc7872f5f53b7094640358a5974ec78a63c549d66cffca0d4cd2896

Contents?: true

Size: 730 Bytes

Versions: 5

Compression:

Stored size: 730 Bytes

Contents

require 'spec_helper'

module AirPlayer
  describe Controller do
    let (:controller) do
      AirPlayer::Controller
    end

    before do
      Airplay.devices << double_device
    end

    describe '.new' do
      context 'with args' do
        it 'returns instance of Controller' do
          expect(controller.new(device: 0)).to be_kind_of Controller
        end
      end

      context 'without args' do
        it 'raise TypeError' do
          expect{ controller.new }.to raise_error(TypeError)
        end
      end
    end

    describe '.pause' do
      context 'with not playing media' do
        it 'do nothing' do
          expect(controller.new(device: 0).pause).to be nil
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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