spec/oldtime_spec.rb in oldtime-0.0.1 vs spec/oldtime_spec.rb in oldtime-0.1.0
- old
+ new
@@ -18,6 +18,20 @@
it "#restore" do
restore(:foo){ "restore" }
Rc.restore_blks[:foo].call.should == "restore"
end
+
+ describe "#check_root" do
+ it "works" do
+ Process.stub(:uid){ 1000 }
+ lambda { check_root }.should raise_error(Oldtime::Error)
+ end
+ end
+
+ describe "#check_mountpoint" do
+ it "works" do
+ Pa.stub(:mountpoint?){ false }
+ lambda { check_mountpoint("x") }.should raise_error(Oldtime::Error)
+ end
+ end
end