diff options
| author | mo khan <mo@mokhan.ca> | 2013-10-12 18:56:14 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-10-12 18:56:14 -0600 |
| commit | 67cb1628914aa376bb6ea8ae01c04ebdda6d5118 (patch) | |
| tree | 85cd945bba2d733e2d4b893d08703e4aae96ac89 | |
| parent | 7ad3e1e644649ce918a382f70cbdd134caab910f (diff) | |
add some specs for building out the movie library.
| -rw-r--r-- | lib/movie_library.rb | 2 | ||||
| -rw-r--r-- | spec/movie_library_spec.rb | 37 |
2 files changed, 38 insertions, 1 deletions
diff --git a/lib/movie_library.rb b/lib/movie_library.rb index bf31a48..8d9b325 100644 --- a/lib/movie_library.rb +++ b/lib/movie_library.rb @@ -9,7 +9,7 @@ class MovieLibrary def add(movie) @movies.push(movie) unless include?(movie) - end + end def total_count @movies.size diff --git a/spec/movie_library_spec.rb b/spec/movie_library_spec.rb index 50dcb30..bbeaa63 100644 --- a/spec/movie_library_spec.rb +++ b/spec/movie_library_spec.rb @@ -18,5 +18,42 @@ describe MovieLibrary do library.add(man_on_fire) library.total_count.should == 1 end + + it 'cannot add two movies that have the same title (logically the same)' do + end + end + + context 'Searching for movies' do + it 'Can find all pixar movies' do + end + + it 'Can find all movies published by pixar or disney' do + end + + it 'Can find all movies not published by pixar' do + end + + it 'Can find all movies released after 2004' do + end + + it 'Can find all movies released between 1982 and 2003 - Inclusive' do + end + end + + context 'Sorting movies' do + it 'Sorts all movies by descending title' do + end + + it 'Sorts all movies by ascending title' do + end + + it 'Sorts all movies by descending release date' do + end + + it 'Sorts all movies by ascending release date' do + end + + it 'Sorts all movies by preferred studios and release date ascending' do + end end end |
