<commit_before>require 'rails_helper'

RSpec.describe SignStandard, :type => :model do

  let(:org)                     { build_stubbed(:organization) }
  let(:test_sign_standard)      { build_stubbed(:sign_standard) }
  let(:persisted_sign_standard) { create(:sign_standard) }

  #------------------------------------------------------------------------------
  #
  # Class Methods
  #
  #------------------------------------------------------------------------------


  #------------------------------------------------------------------------------
  #
  # Instance Methods
  #
  #------------------------------------------------------------------------------

  describe '#validates' do
    it 'should have a SMO code' do
      persisted_sign_standard.smo_code = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.smo_code = "R-116"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have a size description' do
      persisted_sign_standard.size_description = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.size_description = "24 x 36"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have a sign description' do
      persisted_sign_standard.sign_description = nil
      expect(test_sign_standard).not_to be_valid

      persisted_sign_standard.sign_description = "Railroad crossing sign"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have an asset subtype' do
      persisted_sign_standard.asset_subtype = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.asset_subtype_id = 1
      expect(persisted_sign_standard).to be_valid
    end

  end

  describe '#description' do
    it 'should be a standard SMO description' do
      expect(test_sign_standard.description).to eq("R-116 24 x 36 Railroad crossing sign")
    end
  end

  describe '#deprecated?' do
    it 'should be false by default' do
      expect(test_sign_standard.deprecated?).to be false
    end
<commit_msg>fix test for change to sign standard descrip<commit_after>require 'rails_helper'

RSpec.describe SignStandard, :type => :model do

  let(:org)                     { build_stubbed(:organization) }
  let(:test_sign_standard)      { build_stubbed(:sign_standard) }
  let(:persisted_sign_standard) { create(:sign_standard) }

  #------------------------------------------------------------------------------
  #
  # Class Methods
  #
  #------------------------------------------------------------------------------


  #------------------------------------------------------------------------------
  #
  # Instance Methods
  #
  #------------------------------------------------------------------------------

  describe '#validates' do
    it 'should have a SMO code' do
      persisted_sign_standard.smo_code = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.smo_code = "R-116"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have a size description' do
      persisted_sign_standard.size_description = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.size_description = "24 x 36"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have a sign description' do
      persisted_sign_standard.sign_description = nil
      expect(test_sign_standard).not_to be_valid

      persisted_sign_standard.sign_description = "Railroad crossing sign"
      expect(persisted_sign_standard).to be_valid
    end

    it 'should have an asset subtype' do
      persisted_sign_standard.asset_subtype = nil
      expect(persisted_sign_standard).not_to be_valid

      persisted_sign_standard.asset_subtype_id = 1
      expect(persisted_sign_standard).to be_valid
    end

  end

  describe '#description' do
    it 'should be a standard SMO description' do
      expect(test_sign_standard.description).to eq("R-116  Railroad crossing sign")
    end
  end

  describe '#deprecated?' do
    it 'should be false by default' do
      expect(test_sign_standard.deprecated?).to be false
    end

{'fraction_non_alphanumeric': 0.21082894106372785, 'fraction_numerical': 0.006229036895064686, 'mean_word_length': 1.8993055555555556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4905402', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1093, 'n_words': 252}