Check Specific Attributes On ActiveRecord Array
books = get_books_by("David Sedaris")
expect(books).to match_array(
[
have_attributes(
"title" => "Calypso",
"publication_year" => "2018",
),
have_attributes(
"title" => "Theft By Finding",
"publication_year" => "2017",
),
],
)Last updated