blue-shell 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/blue-shell/runner.rb +8 -0
- data/lib/blue-shell/version.rb +1 -1
- data/spec/runner_spec.rb +22 -0
- data/spec/support/escaped_keys.rb +1 -0
- metadata +2 -2
data/lib/blue-shell/runner.rb
CHANGED
data/lib/blue-shell/version.rb
CHANGED
data/spec/runner_spec.rb
CHANGED
@@ -180,6 +180,28 @@ module BlueShell
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
183
|
+
describe "#send_right_arrow" do
|
184
|
+
it "sends a right arrow key press and expects more output afterwards" do
|
185
|
+
BlueShell::Runner.run("ruby #{asset("unbuffered_input.rb")} #{EscapedKeys::KEY_RIGHT}") do |runner|
|
186
|
+
expect(runner.expect("started")).to be_true
|
187
|
+
runner.send_right_arrow
|
188
|
+
expect(runner.expect('received: "\e[C"')).to be_true
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
describe "#send_backspace" do
|
194
|
+
it "sends a backspace key press and expects a character to be deleted" do
|
195
|
+
BlueShell::Runner.run("ruby #{asset("input.rb")}") do |runner|
|
196
|
+
expect(runner.expect("started")).to be_true
|
197
|
+
runner.send_keys "foo"
|
198
|
+
runner.send_backspace
|
199
|
+
runner.send_return
|
200
|
+
expect(runner.expect('received fo')).to be_true
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
183
205
|
context "#exit_code" do
|
184
206
|
it "returns the exit code" do
|
185
207
|
BlueShell::Runner.run("ruby -e 'exit 42'") do |runner|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blue-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|