Skip to content

Commit

Permalink
Merge 225ee99 into 077dc9d
Browse files Browse the repository at this point in the history
  • Loading branch information
dsander committed Oct 13, 2017
2 parents 077dc9d + 225ee99 commit f87333a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--format documentation
--color
--order random
--warnings
--require spec_helper
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ rvm:
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
before_install: gem install bundler -v '~> 1.10'
script: bundle exec rake spec
2 changes: 2 additions & 0 deletions lib/backticks/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def initialize(pid, stdin, stdout, stderr, interactive:false)
@stdout = stdout
@stderr = stderr
@interactive = !!interactive
@tap = nil
@status = nil

@captured_input = String.new.force_encoding(Encoding::BINARY)
@captured_output = String.new.force_encoding(Encoding::BINARY)
Expand Down
1 change: 1 addition & 0 deletions lib/backticks/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def initialize(options={})
}.merge(options)

@cli = options[:cli]
@chdir = nil
self.buffered = options[:buffered]
self.interactive = options[:interactive]
end
Expand Down
6 changes: 3 additions & 3 deletions spec/backticks/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
it 'spawns with new pwd' do
subject.chdir='/tmp/banana'
expect(subject).to receive(:spawn).with('ls', hash_including(chdir:'/tmp/banana'))
cmd = subject.run('ls')
subject.run('ls')
end

it 'defaults to PWD' do
subject.chdir=nil
expect(subject).to receive(:spawn).with('ls', hash_including(chdir:Dir.pwd))
cmd = subject.run('ls')
subject.run('ls')
end
end

Expand Down Expand Up @@ -71,4 +71,4 @@
end
end
end
end
end

0 comments on commit f87333a

Please sign in to comment.