require_relative "test_helper" class ConfigTest < Minitest::Test def test_nil_contents_is_unconfigured config = Backlog::Config.new(nil) refute config.configured? assert_nil config.board end def test_blank_contents_is_unconfigured config = Backlog::Config.new(" \n") refute config.configured? end def test_reads_board_key config = Backlog::Config.new("board: llf-schema\n") assert config.configured? assert_equal "llf-schema", config.board end def test_malformed_yaml_is_treated_as_unconfigured config = Backlog::Config.new("board: [unterminated\n") refute config.configured? end def test_yaml_without_board_key_is_unconfigured config = Backlog::Config.new("other: value\n") refute config.configured? end end