2011-05-06 17:29:24 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Guard::Interactor do
|
2011-09-01 21:24:45 +00:00
|
|
|
subject { Guard::Interactor.new }
|
2011-05-13 09:26:05 +00:00
|
|
|
|
2011-09-01 21:24:45 +00:00
|
|
|
describe "#initialize" do
|
|
|
|
it "un-lock by default" do
|
|
|
|
subject.locked.should be_false
|
2011-05-13 09:26:05 +00:00
|
|
|
end
|
2011-05-06 17:29:24 +00:00
|
|
|
end
|
|
|
|
|
2011-09-01 21:24:45 +00:00
|
|
|
describe "#lock" do
|
|
|
|
it "locks" do
|
|
|
|
subject.lock
|
|
|
|
subject.locked.should be_true
|
2011-05-13 09:26:05 +00:00
|
|
|
end
|
2011-05-06 17:29:24 +00:00
|
|
|
end
|
|
|
|
|
2011-09-01 21:24:45 +00:00
|
|
|
describe "#unlock" do
|
|
|
|
it "unlocks" do
|
|
|
|
subject.unlock
|
|
|
|
subject.locked.should be_false
|
2011-05-13 09:26:05 +00:00
|
|
|
end
|
2011-05-06 17:29:24 +00:00
|
|
|
end
|
2011-09-01 21:24:45 +00:00
|
|
|
|
2011-05-06 17:29:24 +00:00
|
|
|
end
|