lib/helpers/general_test_helper.rb
def assert_kind(expected_class, actual_object)
    expected_class = expected_class.to_s.camelize # turn the expected class into a camelized string
    actual_object = actual_object.first if actual_object.respond_to? "each" # check first item
    assert_equal expected_class, actual_object.class.to_s, "expected object to be class '#{expected_class}' but was '#{actual_object.class}'"
  end
# asserts that the given item or an item in an array is of a given type
# ex. assert_kind :some_class, @object => checks that @object.class == SomeClass
asserts that the given item or an item in an array is of a given type
ex.
asserts that the given item or an item in an array is of a given type ex .
def assert_kind(expected_class, actual_object)
    expected_class = expected_class.to_s.camelize 
    actual_object = actual_object.first if actual_object.respond_to? "each" 
    assert_equal expected_class, actual_object.class.to_s, "expected object to be class '#{expected_class}' but was '#{actual_object.class}'"
  end
def assert_kind ( expected_class , actual_object ) expected_class = expected_class . to_s . camelize actual_object = actual_object . first if actual_object . respond_to? "each" assert_equal expected_class , actual_object . class . to_s , "expected object to be class '#{expected_class}' but was '#{actual_object.class}'" end
asserts that the given item or an item in an array is of a given type
ex.
asserts that the given item or an item in an array is of a given type ex .
# turn the expected class into a camelized string # check first item
expected_class
actual_object