From 56ac50c5682cd668fc5c7680c6bf2eff8b2d4b0e Mon Sep 17 00:00:00 2001 From: Mike Kruk Date: Wed, 8 Oct 2014 17:02:36 -0400 Subject: [PATCH] where filter - test return value when filtering a Hash --- test/test_filters.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_filters.rb b/test/test_filters.rb index 84c6e1ae..d7457cdd 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -176,7 +176,9 @@ class TestFilters < Test::Unit::TestCase end should "filter objects in a hash appropriately" do - assert_equal 1, @filter.where({"a"=>{"color"=>"red"}, "b"=>{"color"=>"blue"}}, "color", "red").length + hash = {"a"=>{"color"=>"red"}, "b"=>{"color"=>"blue"}} + assert_equal 1, @filter.where(hash, "color", "red").length + assert_equal [{"color"=>"red"}], @filter.where(hash, "color", "red") end should "filter objects appropriately" do