Sha256: aa3b3d11916202b7a5f00eb619994d45c6c11062f31c4e2d60303b511f27186d

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

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

module Vedeu
  describe Interface do
    let(:described_class)    { Interface }
    let(:described_instance) { described_class.new(attributes) }
    let(:subject)            { described_instance }
    let(:attributes)         {
      {
        name: 'dummy',
        geometry: { width: 80, height: 25, x: 1, y: 1 }
      }
    }
    let(:result)             {}

    before do
    end

    it { subject.must_be_instance_of(Interface) }
    it { subject.instance_variable_get("@attributes").must_equal(attributes) }
    it { subject.instance_variable_get("@active").must_equal(false) }
    it { subject.instance_variable_get("@geometry").must_equal(attributes[:geometry]) }
    it { subject.instance_variable_get("@name").must_equal('dummy') }

    describe '#create' do
      let(:subject) { described_class.create(attributes) }

      it { subject.must_be_instance_of(Interface) }
    end

    describe '#initial_state' do
      let(:subject) { described_instance.initial_state }

      it { subject.must_be_instance_of(NilClass) }
    end

    describe '#geometry' do
      let(:subject) { described_instance.geometry }

      it { subject.must_be_instance_of(Geometry) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.14 test/lib/vedeu/repository/interface_test.rb