Sha256: bd1906c5863bd1f7d2138822327dd15ec7831839a518fe595ef8621e8e794f6c
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
require './test/test_helper' class ExercismTest < Minitest::Test def teardown if File.exists?('./test/fixtures/.exercism') FileUtils.rm('./test/fixtures/.exercism') end end def test_logged_in_user Exercism.stub(:home, './test/fixtures/home') do user = Exercism.user key = '634abfb095ed621e1c793c9875fcd9fda455ea90' assert_equal 'alice', user.github_username assert_equal key, user.key end end def test_login_writes_the_config_file home = './test/fixtures' Exercism.stub(:home, home) do key = '97e9975' Exercism.login('bob', key, '/tmp', home) user = Exercism.user assert_equal 'bob', user.github_username assert_equal key, user.key end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
exercism-0.0.19 | test/exercism_test.rb |