File: exec_helper_spec.rb

package info (click to toggle)
ruby-mina 0.3.7-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 444 kB
  • sloc: ruby: 1,630; makefile: 31
file content (19 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'spec_helper'

describe 'Exec Helpers' do
  before :each do
    @exec = Object.new
    @exec.send :extend, Mina::ExecHelpers

    allow(@exec).to receive(:print_char)
  end

  it 'pretty_system' do
    @exec.pretty_system "echo 'Hello there'"

    expect(@exec).to have_received(:print_char).
      with("e").with("r").with("e").with("h").with("t").
      with(" ").
      with("o").with("l").with("l").with("e").with("H")
  end
end