diff options
| author | mo k <mo@mokhan.ca> | 2012-02-11 12:35:36 -0700 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-02-11 12:35:36 -0700 |
| commit | 34a96fd1cd221b2b60095940419797786fa61d76 (patch) | |
| tree | 7a0353b799a8f1ae696f192ffbadc273441cae72 /lib | |
| parent | 1358abc89dc3a5709a65a40b6e2a327a1e816b30 (diff) | |
spiking out developwithpassion_fakes. i like it!
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/library.rb | 2 | ||||
| -rw-r--r-- | lib/specifications/find_all_books_by_author.rb | 2 |
2 files changed, 2 insertions, 2 deletions
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 |
