Sha256: a9052d525308c458a45002ca7ec5b0f0713ee559db77fda36c2467767a7c4da2

Contents?: true

Size: 602 Bytes

Versions: 13

Compression:

Stored size: 602 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
require 'artoo/adaptors/sphero'
require 'sphero'

describe Artoo::Adaptors::Sphero do
  before do
    @port = Artoo::Port.new('/dev/awesome')
    @adaptor = Artoo::Adaptors::Sphero.new(:port => @port)
    @sphero = mock('sphero')
    Sphero.stubs(:new).returns(@sphero)
  end

  it 'Artoo::Adaptors::Sphero#connect' do
    @adaptor.connect.must_equal true
  end

  it 'Artoo::Adaptors::Sphero#disconnect' do
    @adaptor.connect

    @sphero.expects(:close)
    @adaptor.disconnect
    @adaptor.connected?.must_equal false
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
artoo-sphero-1.5.1 test/adaptors/sphero_test.rb
artoo-sphero-1.5.0 test/adaptors/sphero_test.rb
artoo-sphero-1.4.0 test/adaptors/sphero_test.rb
artoo-sphero-1.3.0 test/adaptors/sphero_test.rb
artoo-sphero-1.2.0 test/adaptors/sphero_test.rb
artoo-sphero-1.1.1 test/adaptors/sphero_test.rb
artoo-sphero-1.1.0 test/adaptors/sphero_test.rb
artoo-sphero-1.0.1 test/adaptors/sphero_test.rb
artoo-sphero-1.0.1.pre test/adaptors/sphero_test.rb
artoo-sphero-1.0.0 test/adaptors/sphero_test.rb
artoo-sphero-1.0.0.rc2 test/adaptors/sphero_test.rb
artoo-sphero-1.0.0.rc1 test/adaptors/sphero_test.rb
artoo-sphero-1.0.0.pre test/adaptors/sphero_test.rb