Sha256: 294988a67fdd3dc5f0ffa435e2c4d30314af033296b5b980a9252d78bf3af273

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

require_relative '../../../test_helper'

module Vedeu
  describe InterfaceRepository do
    let(:described_class) { InterfaceRepository }

    before { Interface.create({ name: 'dummy' }) }

    after  { InterfaceRepository.reset }

    describe '.activate' do
      let(:subject)   { described_class.activate(interface) }
      let(:interface) { 'dummy' }

      it 'returns an Array' do
        subject.must_be_instance_of(Array)
      end
    end

    describe '.deactivate' do
      let(:subject) { described_class.deactivate }

      it 'returns an Array' do
        subject.must_be_instance_of(Array)
      end
    end

    describe '.activated' do
      let(:subject) { described_class.activated }

      it 'returns an Interface' do
        subject.must_be_instance_of(Interface)
      end
    end

    describe '.find_by_name' do
      let(:subject) { described_class.find_by_name(value) }
      let(:value)   { 'dummy' }

      it 'returns an Interface' do
        subject.must_be_instance_of(Interface)
      end
    end

    describe '.update' do
      let(:subject) { described_class.update }

      before { Compositor.stubs(:arrange) }

      it 'returns an Array' do
        subject.must_be_instance_of(Array)
      end
    end

    describe '.klass' do
      let(:subject) { described_class.klass }

      it 'returns an Interface' do
        subject.must_equal(Interface)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.20 test/lib/vedeu/repository/interface_repository_test.rb