master/spec/guard/interactor_spec.rb
Michael Kessler 072d5404ee Merge pull request #137 from hron/guard
---

It seems like the new interactor eats input from $stdin even while it is locked. This disallow using tools like ruby-debug or pry in specs or cucumber.

The fix just kills the interactor when it is locked and runs it again when ulocked.

Conflicts:
	lib/guard/interactor.rb
2011-09-21 00:34:11 +02:00

29 lines
517 B
Ruby

require 'spec_helper'
describe Guard::Interactor do
subject { Guard::Interactor.new }
describe "#initialize" do
it "unlocks the interactor by default" do
subject.locked.should be_false
end
end
describe "#lock" do
it "locks the interactor" do
subject.start
subject.lock
subject.locked.should be_true
end
end
describe "#unlock" do
it "unlocks the interactor" do
subject.start
subject.unlock
subject.locked.should be_false
end
end
end