Permalink
Browse files

Stub out EngineManager and crappy spec

  • Loading branch information...
1 parent 7ef8836 commit 63606c3f4624902fb87bc70093f53747255b1b30 @paulcbetts committed Jun 16, 2008
Showing with 31 additions and 0 deletions.
  1. +3 −0 lib/engine.rb
  2. +28 −0 spec/engine_spec.rb
View
@@ -38,6 +38,9 @@
$logging_level ||= Logger::ERROR
+class EngineManager
+end
+
class Engine
include ApplicationState
View
@@ -13,6 +13,34 @@
EOF
+describe EngineManager do
+ it "should be able to add engines given a source and target" do
+ em = EngineManager.new
+ source = "/path/to/source.avi"
+ target = "/the/target/source.mp4"
+ em.add(source, target)
+ end
+
+ it "should be able to remove engines" do
+ em = EngineManager.new
+ source = "/path/to/source.avi"
+ target = "/the/target/source.mp4"
+ em.add(source, target)
+ em.remove(source, target)
+ end
+
+ it "should be able to enumerate through engines" do
+ em = EngineManager.new
+ source = "/path/to/source.avi"
+ target = "/the/target/source.mp4"
+ em.add(source, target)
+
+ i = 0
+ em.each {|x| i=i+1}
+ i.should = 1
+ end
+end
+
describe Engine do
it "Should convert a file and mark it succeeded or failed" do
source = "/path/to/source.avi"

0 comments on commit 63606c3

Please sign in to comment.