Sha256: 024ae99aee3f6118d3b0da061206f85bfc70a61401fa9a09f264116e94ad6fcf

Contents?: true

Size: 913 Bytes

Versions: 2

Compression:

Stored size: 913 Bytes

Contents

require 'spec_helper'
require 'models/taxonomite/zoology'

module Taxonomite
    RSpec.describe Entity, type: :model do

        context 'model function' do
            let!(:being) { build(:taxonomite_beingrep) }

            it 'instantiates an entity' do
                expect(being.class.name).to eq("Taxonomite::BeingRep")
            end

            it 'destroys an entity' do
                expect { being.destroy }.not_to raise_error
            end

            it 'sets the name' do
                being.name = "new_name"
                expect(being.name).to eq("new_name")
            end

            it 'allow access to taxonomy_node' do
                expect { being.get_taxonomy_node }.not_to raise_error
            end

            it 'expects taxonomy_node to have a name' do
                expect(being.get_taxonomy_node.name).to eq(being.name)
            end

        end

    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taxonomite-0.2.3 spec/models/taxonomite/entity_spec.rb
taxonomite-0.1.0 spec/models/taxonomite/entity_spec.rb