Created
November 4, 2009 18:35
-
-
Save joevandyk/226278 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + "/../test_helper") | |
require 'action_view/test_case' | |
class TestBusinessSearchHelpers < ActionView::TestCase | |
include BusinessSearchHelper | |
ADDRESS_FORMATTERS_EXAMPLES = [ | |
{ :input => "Foo Goo 123", | |
:expected => "Foo Goo 123" }, | |
{ :input => "Blah Ste 345", | |
:expected => "Blah Ste 345" }, | |
{ :input => "Blah apt. 345", | |
:expected => "Blah apt. 345" }, | |
{ :input => "Blah apartment. 345", | |
:expected => "Blah apartment. 345" }, | |
{ :input => "", | |
:expected => "" }, | |
{ :input => "Joe's Apartment 123", | |
:expected => "Joe's Apartment 123" }, | |
] | |
ADDRESS_FORMATTERS_EXAMPLES.each_with_index do |options, i| | |
define_method "test_format_address_#{i}" do | |
assert_equal options[:expected], format_address(options[:input]) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment