# File scripts/test-harvester.rb, line 98 def test_ad ad = Ad.new("Neat WG home") rule = KeywordRule.new(["WG"], {"city"=>'San Jose', "neighborhood"=>"Willow Glen"}) ad.apply_rule(rule) assert_equal(ad.get_marked_text, 'Neat <match city="San Jose" neighborhood="Willow Glen">WG</match> home') assert_equal('San Jose', ad.atts[5]['city']) end