class TestData::TestLoadData::TestFileFormat::TestHeader

Public Instance Methods

test_label(file_name) click to toggle source
# File test-unit-3.3.4/test/test-data.rb, line 387
def test_label(file_name)
  self.class.load_data(fixture_file_path(file_name))
  data_sets = Test::Unit::DataSets.new
  data_sets << {
    "upper case" => {
      "expected" => "HELLO",
      "label"    => "HELLO"
    }
  }
  data_sets << {
    "lower case" => {
      "expected" => "Hello",
      "label"    => "hello"
    }
  }
  assert_equal(data_sets,
               self.class.current_attribute(:data)[:value])
end
test_normal(file_name) click to toggle source
# File test-unit-3.3.4/test/test-data.rb, line 366
def test_normal(file_name)
  self.class.load_data(fixture_file_path(file_name))
  data_sets = Test::Unit::DataSets.new
  data_sets << {
    "empty string" => {
      "expected" => true,
      "target"   => ""
    }
  }
  data_sets << {
    "plain string" => {
      "expected" => false,
      "target"   => "hello"
    }
  }
  assert_equal(data_sets,
               self.class.current_attribute(:data)[:value])
end