master/spec/guard/interactor_spec.rb

29 lines
517 B
Ruby
Raw Normal View History

require 'spec_helper'
describe Guard::Interactor do
2011-09-01 21:24:45 +00:00
subject { Guard::Interactor.new }
2011-09-01 21:24:45 +00:00
describe "#initialize" do
it "unlocks the interactor by default" do
2011-09-01 21:24:45 +00:00
subject.locked.should be_false
end
end
2011-09-01 21:24:45 +00:00
describe "#lock" do
it "locks the interactor" do
subject.start
2011-09-01 21:24:45 +00:00
subject.lock
subject.locked.should be_true
end
end
2011-09-01 21:24:45 +00:00
describe "#unlock" do
it "unlocks the interactor" do
subject.start
2011-09-01 21:24:45 +00:00
subject.unlock
subject.locked.should be_false
end
end
2011-09-01 21:24:45 +00:00
end