spec/job_spec.rb in vtools-0.1.1 vs spec/job_spec.rb in vtools-1.0.0
- old
+ new
@@ -15,11 +15,11 @@
# specs
context "#execute" do
def stub_methods
- VTools::Handler.stub!(:exec).and_return nil
+ VTools::Hook.stub!(:exec).and_return nil
@video.stub(:get_info).and_return {"info.result"}
@video.stub(:convert).and_return {"encoded.result"}
@video.stub(:create_thumbs).and_return {"thumbs.result"}
end
@@ -32,33 +32,33 @@
it "receives video info" do
stub_methods
set_action "info"
- VTools::Handler.should_receive(:exec).with(:job_started, @video, "info")
- VTools::Handler.should_receive(:exec).with(:job_finished, "info.result", @video, "info")
+ VTools::Hook.should_receive(:exec).with(:job_started, @video, "info")
+ VTools::Hook.should_receive(:exec).with(:job_finished, "info.result", @video, "info")
@video.should_receive(:get_info)
@job.execute.should == "info.result"
end
it "starts video encoding" do
stub_methods
set_action "convert"
- VTools::Handler.should_receive(:exec).with(:job_started, @video, "convert")
- VTools::Handler.should_receive(:exec).with(:job_finished, "encoded.result", @video, "convert")
+ VTools::Hook.should_receive(:exec).with(:job_started, @video, "convert")
+ VTools::Hook.should_receive(:exec).with(:job_finished, "encoded.result", @video, "convert")
@video.should_receive(:convert)
@job.execute.should == "encoded.result"
end
it "creates thumbnails" do
stub_methods
set_action "thumbs"
- VTools::Handler.should_receive(:exec).with(:job_started, @video, "thumbs")
- VTools::Handler.should_receive(:exec).with(:job_finished, "thumbs.result", @video, "thumbs")
+ VTools::Hook.should_receive(:exec).with(:job_started, @video, "thumbs")
+ VTools::Hook.should_receive(:exec).with(:job_finished, "thumbs.result", @video, "thumbs")
@video.should_receive(:create_thumbs)
@job.execute.should == "thumbs.result"
end
end