-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue the work on the new Guard::API
Signed-off-by: Rémy Coutable <remy@rymai.me>
- Loading branch information
Showing
17 changed files
with
123 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require "guard" | ||
|
||
module Guard | ||
# @private api | ||
module Internals | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
require "guard/commands/pause" | ||
|
||
RSpec.describe Guard::Commands::Pause do | ||
class FakePry < Pry::Command | ||
def self.output | ||
let(:fake_pry_class) do | ||
Class.new(Pry::Command) do | ||
def self.output; end | ||
end | ||
end | ||
|
||
before do | ||
allow(FakePry).to receive(:output).and_return(output) | ||
allow(fake_pry_class).to receive(:output).and_return(output) | ||
allow(Pry::Commands).to receive(:create_command).with("pause") do |&block| | ||
FakePry.instance_eval(&block) | ||
fake_pry_class.instance_eval(&block) | ||
end | ||
|
||
described_class.import | ||
end | ||
|
||
it "tells Guard to pause" do | ||
expect(::Guard).to receive(:async_queue_add).with([:guard_pause]) | ||
FakePry.process | ||
fake_pry_class.process | ||
end | ||
end |
Oops, something went wrong.