blue-shell 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,6 +37,10 @@ module BlueShell
37
37
  @stdin.puts(text_to_send)
38
38
  end
39
39
 
40
+ def send_return
41
+ @stdin.puts
42
+ end
43
+
40
44
  def exit_code
41
45
  return @code if @code
42
46
 
@@ -1,3 +1,3 @@
1
1
  module BlueShell
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
data/spec/runner_spec.rb CHANGED
@@ -161,7 +161,17 @@ module BlueShell
161
161
  BlueShell::Runner.run("ruby #{asset("input.rb")}") do |runner|
162
162
  expect(runner.expect("started")).to be_true
163
163
  runner.send_keys("foo")
164
- expect(runner.expect("foo")).to be_true
164
+ expect(runner.expect("received foo")).to be_true
165
+ end
166
+ end
167
+ end
168
+
169
+ describe "#send_return" do
170
+ it "sends a return and expects more output afterwards" do
171
+ BlueShell::Runner.run("ruby #{asset("input.rb")}") do |runner|
172
+ expect(runner.expect("started")).to be_true
173
+ runner.send_return
174
+ expect(runner.expect("received ")).to be_true
165
175
  end
166
176
  end
167
177
  end
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.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: