diff options
| author | mo k <m@mokhan.ca> | 2011-11-12 10:12:57 -0700 |
|---|---|---|
| committer | mo k <m@mokhan.ca> | 2011-11-12 10:12:57 -0700 |
| commit | 331252e2fb694e8dde22284a9d290a24a2ac729c (patch) | |
| tree | 2893059752ec0c796e4d7bdc487c6aad2740d6a2 | |
| parent | 9f1264b8a9e9c70cab43aed5c06e8e5e3e272fda (diff) | |
move find_all_books_by_author to separate file.
| -rw-r--r-- | lib/find_all_books_by_author.rb | 8 | ||||
| -rw-r--r-- | test/library_specs.rb | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/find_all_books_by_author.rb b/lib/find_all_books_by_author.rb new file mode 100644 index 0000000..c142f6a --- /dev/null +++ b/lib/find_all_books_by_author.rb @@ -0,0 +1,8 @@ +class FindAllBooksByAuthor + def initialize(author) + @author = author + end + def is_satisfied_by(book) + book.author == @author + end +end diff --git a/test/library_specs.rb b/test/library_specs.rb index ef68e4c..2c4e84a 100644 --- a/test/library_specs.rb +++ b/test/library_specs.rb @@ -1,6 +1,7 @@ require "book" require "publisher" require "library" +require "find_all_books_by_author" class TestLibrary < Test::Unit::TestCase def setup @@ -25,11 +26,3 @@ class TestLibrary < Test::Unit::TestCase assert_includes(matches, @pickaxe) end end -class FindAllBooksByAuthor - def initialize(author) - @author = author - end - def is_satisfied_by(book) - book.author == @author - end -end |
