<commit_before>require_relative '../lib/encrypt'
require 'minitest/autorun'
require 'minitest/pride'

using Encrypt

describe Encrypt do
  before do
    @encrypted = 'sekret'.encrypt('passw0rd')
  end

  it 'encrypts' do
    assert @encrypted != 'sekret'
  end

  it 'decrypts' do
    assert_equal 'sekret', @encrypted.decrypt('passw0rd')
  end
end<commit_msg>Add a test for incorrect key.<commit_after>require_relative '../lib/encrypt'
require 'minitest/autorun'
require 'minitest/pride'

using Encrypt

describe Encrypt do
  before do
    @encrypted = 'sekret'.encrypt('passw0rd')
  end

  it 'encrypts' do
    assert @encrypted != 'sekret'
  end
  
  it 'does not decrypt with incorrect key' do
    refute_equal 'sekret', @encrypted.decrypt('password')
  end

  it 'decrypts' do
    assert_equal 'sekret', @encrypted.decrypt('passw0rd')
  end
end
{'fraction_non_alphanumeric': 0.11307420494699646, 'fraction_numerical': 0.004711425206124852, 'mean_word_length': 4.089820359281437, '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': '6572318', 'n_tokens_mistral': 311, 'n_tokens_neox': 306, 'n_words': 78}