<commit_before>require "boxen/test"
require "boxen/keychain"

class BoxenKeychainTest < Boxen::Test
  def setup
    @keychain = Boxen::Keychain.new('test')
  end

  def test_true
    assert true
  end
end<commit_msg>flesh out tests with some mocking (yuck)<commit_after>require "boxen/test"
require "boxen/keychain"

class BoxenKeychainTest < Boxen::Test
  def setup
    @keychain = Boxen::Keychain.new('test')
  end

  def test_get_password
    @keychain.expects(:get).with('GitHub Password').returns('foobar')
    assert_equal 'foobar', @keychain.password
  end

  def test_set_password
    @keychain.expects(:set).with('GitHub Password', '<PASSWORD>').returns('foobar')
    assert_equal 'foobar', @keychain.password=('<PASSWORD>')
  end

  def test_get_token
    @keychain.expects(:get).with('GitHub API Token').returns('foobar')
    assert_equal 'foobar', @keychain.token
  end

  def test_set_token
    @keychain.expects(:set).with('GitHub API Token', 'foobar').returns('foobar')
    assert_equal 'foobar', @keychain.token=('foobar')
  end
end
{'fraction_non_alphanumeric': 0.13740458015267176, 'fraction_numerical': 0.0, 'mean_word_length': 4.926553672316384, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7121296', 'n_tokens_mistral': 380, 'n_tokens_neox': 356, 'n_words': 72}