authors_with_welcoming_post_titles=Author.calculate(:count,'authors.id',:joins=>:posts,:distinct=>true,:conditions=>"posts.title like 'Welcome%'")
assert_equalreal_count,authors_with_welcoming_post_titles,"inner join and conditions should have only returned authors posting titles starting with 'Welcome'"