grouped_posts_of_category1=Post.scoped(:conditions=>"category_id = 1",:group=>"author_id",:select=>'count(posts.id) as posts_count',:joins=>:categories).all
grouped_posts_of_category1=Post.scoped(:where=>"category_id = 1",:group=>"author_id",:select=>'count(posts.id) as posts_count',:joins=>:categories).all
assert_equal@test_klass.scoped_by_author_id_and_title(1,"Welcome to the weblog").first,@test_klass.scoped(:conditions=>{:author_id=>1,:title=>"Welcome to the weblog"}).first
assert_equal@test_klass.scoped_by_author_id_and_title(1,"Welcome to the weblog").first,@test_klass.scoped(:where=>{:author_id=>1,:title=>"Welcome to the weblog"}).first