       it 'returns true when it unlocks the plugin successfully', ->
         sinon.stub(@plugin, 'Locked').returns false
         @communicator.plugin = @plugin
-        expect(@communicator.unlock()).to.be_true
+        expect(@communicator.unlock()).to.equal true
 
       xit 'throws an exception if the plugin fails to unlock'
 

    it 'returns true if the plugin is locked', ->
      sinon.stub(@plugin, 'Locked').returns true
      @communicator.plugin = @plugin
      expect(@communicator.isLocked()).to.be_true

    it 'returns false if the plugin is unlocked', ->
      sinon.stub(@plugin, 'Locked').returns false
      @communicator.plugin = @plugin
      expect(@communicator.isLocked()).to.be_false

  describe '#unlock', ->
    beforeEach ->

      @isLockedStub = sinon.stub(@communicator, 'isLocked').returns true
      @unlockStub = sinon.stub(@communicator, 'unlock')
      @communicator.devices()
      expect(@unlockStub.calledOnce).to.equal true

    it 'returns a promise', ->
      subject = @communicator.devices()
      expect(subject.isDeferred).to.equal true

    it 'marks the communicator as being busy', ->
      @communicator.devices()
      expect(@communicator.isBusy).to.equal true

    it 'marks the communicator as being inactive once the promise is called', ->
      @FinishFindDevicesStub.returns false
      @communicator.devices()
      expect(@communicator.isBusy).to.equal true
      @FinishFindDevicesStub.returns true
      expect(@communicator.isBusy).to.equal false

    describe 'when the plugin is already busy', ->
      it 'does nothing', ->
