<commit_before>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<commit_msg>add spec to check entity-node relationship<commit_after>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

            it 'can get to the entity through the taxonomy_node' do
              expect(being.get_taxonomy_node.owner).to eq(being)
            end

        end

    end
end
{'fraction_non_alphanumeric': 0.07583859990277103, 'fraction_numerical': 0.0, 'mean_word_length': 1.6866840731070496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1351190', 'n_tokens_mistral': 597, 'n_tokens_neox': 559, 'n_words': 157}