Sha256: 487b4ca4871c6831946355c2713ab8d14efa15cd9693b4a8644c51548dc84066

Contents?: true

Size: 618 Bytes

Versions: 4

Compression:

Stored size: 618 Bytes

Contents

require 'helper'

class TestConfig < Test::Unit::TestCase

  def setup
    global_setup
    @config = Stars::Config.new
  end

  def test_yaml_load
    assert_equal 'holman', @config.username('favstar')
  end

  def test_prompt_for_username_existing_service
    @config.keep.stubs(:present?).returns(true)
    Keep.any_instance.expects(:get)
    @config.prompt_for_username("favstar")
  end

  def test_add_username_to_nonexistent_service
    Stars::Config.any_instance.expects(:exit)
    @config.prompt_for_username("trololol")
  end

  def test_config_path
    assert @config.config_path.kind_of?(String)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stars-0.5.3 test/test_config.rb
stars-0.5.2 test/test_config.rb
stars-0.5.1 test/test_config.rb
stars-0.5.0 test/test_config.rb