<commit_before><commit_msg>Backfill another spec<commit_after>require 'spec_helper'

describe Nullalign::Introspectors::ValidatesPresenceOf do

  describe "finding missing nonnull constraints" do
    it "finds one" do
      indexes = subject.missing_nonnull_constraints(WrongAccount)

      expect(indexes).to eq([
        Nullalign::NonnullConstraint.new(
          WrongAccount,
          WrongAccount.table_name,
          "email"
        )
      ])
    end

    it "finds none when they're already in place" do
      expect(subject.missing_nonnull_constraints(CorrectAccount)).to be_empty
    end

  end

end
{'fraction_non_alphanumeric': 0.07516339869281045, 'fraction_numerical': 0.0, 'mean_word_length': 3.2275862068965515, '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': '1209022', 'n_tokens_mistral': 185, 'n_tokens_neox': 176, 'n_words': 40}