From 34a96fd1cd221b2b60095940419797786fa61d76 Mon Sep 17 00:00:00 2001 From: mo k Date: Sat, 11 Feb 2012 12:35:36 -0700 Subject: spiking out developwithpassion_fakes. i like it! --- lib/library.rb | 2 +- lib/specifications/find_all_books_by_author.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/library.rb b/lib/library.rb index d33806e..5f958fa 100644 --- a/lib/library.rb +++ b/lib/library.rb @@ -9,6 +9,6 @@ class Library @books.find { |book| book.is_titled?(title) } != nil end def find_all_matching(criteria) - @books.find_all {|book| criteria.is_satisfied_by(book) } + @books.find_all {|book| criteria.is_satisfied_by?(book) } end end diff --git a/lib/specifications/find_all_books_by_author.rb b/lib/specifications/find_all_books_by_author.rb index c142f6a..7e53e55 100644 --- a/lib/specifications/find_all_books_by_author.rb +++ b/lib/specifications/find_all_books_by_author.rb @@ -2,7 +2,7 @@ class FindAllBooksByAuthor def initialize(author) @author = author end - def is_satisfied_by(book) + def is_satisfied_by?(book) book.author == @author end end -- cgit v1.2.3