test/test_movie-renamer.rb in movie-renamer-0.0.12 vs test/test_movie-renamer.rb in movie-renamer-0.0.15
- old
+ new
@@ -56,10 +56,11 @@
must "rename a movie correctly without part because part is wrong" do
movie = MovieRenamer::Movie.new 'movie1.avi', year: '2001' , director: 'me', title: 'famous', part: ' '
assert_equal "2001 - me - famous.avi",MovieRenamer::newName(movie)
end
+=begin
# print movie info check
# XXX usless check for now
must "print movie info correctly" do
movie = MovieRenamer::Movie.new 'movie1.avi', year: '2001' , director: 'me', title: 'famous'
assert MovieRenamer::printMovieInfo(movie)
@@ -76,18 +77,11 @@
must "return false on no input" do
provide_input "no\n"
assert ! MovieRenamer::ask("do you want to edit this movie")
expect_output "do you want to edit this movie\n"
end
-
- # test input sanitize
- must "sanitize input correctly" do
- input = "ain't a very bad movie{}\@# son "
- assert_equal "ain't a very bad movie son", MovieRenamer::sanitizeInput(input)
- end
-
- # test edit movie
+ # test edit movie
must "edit a movie correctly" do
provide_input "yes\n1984\nOrwell James\nBig Brother\n\nyes\n"
assert ! MovieRenamer::editMovie(@movies.first)
end
@@ -95,11 +89,20 @@
provide_input "yes\n1984\nOrwell James\nBig Brother\n\nno\nyes\n1984\nOrwell James\nBig Brother\n1\nyes\n"
assert ! MovieRenamer::editMovie(@movies.first)
#expect_output("wow")
end
+=end
+ # test input sanitize
+ must "sanitize input correctly" do
+ input = "ain't a very bad movie{}\@# son "
+ assert_equal "ain't a very bad movie son", MovieRenamer::sanitizeInput(input)
+ end
+
+
+=begin
# test main loop over folder
must "ask for all movies in folder" do
provide_input "no\nno\nno\nno\n"
assert MovieRenamer::folderLoop()
end
@@ -107,9 +110,10 @@
# suggest movies XXX no test here
must "suggest a movie list from a movie title" do
MovieRenamer::suggestMovies("Kill Bill")
#expect_output "wow"
end
+=end
# helpers
def provide_input (string)
@input << string
@input.rewind