summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/find_all_books_by_author.rb8
-rw-r--r--test/library_specs.rb9
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