<commit_before>require 'test/unit'
$: <<  File.join(File.expand_path(File.dirname(__FILE__)), '../../lib')
require "credio"

class LuhnValidatorTest < Test::Unit::TestCase
    def setup
    end
    
    # check luhn validator number
    def test_visa_card_valid
        assert(Credio::Validators::LuhnValidator::valid?('4408041234567893'), 'Incorrect validation for VISA 4408 0412 3456 7893')
    end
    
    # check luhn validator number
    def test_visa_card_invalid
        assert(Credio::Validators::LuhnValidator::valid?('4417123456789112'), 'Incorrect validation for VISA 4417 1234 5678 9112')
    end
end<commit_msg>Added test for odd length card. Fixed negative scenario.<commit_after>require 'test/unit'
$: <<  File.join(File.expand_path(File.dirname(__FILE__)), '../../lib')
require "credio"

class LuhnValidatorTest < Test::Unit::TestCase
    def setup
    end
    
    # check luhn validator number
    def test_visa_card_valid
        assert(Credio::Validators::LuhnValidator::valid?('4408041234567893'), 'Incorrect validation for VISA 4408 0412 3456 7893')
    end

    # check luhn validator number
    def test_amex_card_valid_odd_length
        assert(Credio::Validators::LuhnValidator::valid?('378282246310005'), 'Incorrect validation for AMEX 378 2822 4631 0005')
    end
    
    # check luhn validator number
    def test_visa_card_invalid
        assert(! Credio::Validators::LuhnValidator::valid?('4417123456789112'), 'Incorrect validation for VISA 4417 1234 5678 9112')
    end
    
end
{'fraction_non_alphanumeric': 0.10449735449735449, 'fraction_numerical': 0.10449735449735449, 'mean_word_length': 4.163822525597269, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7199504', 'n_tokens_mistral': 597, 'n_tokens_neox': 479, 'n_words': 114}