Sha256: 32a7076c2c9cc2a64f422bdf633b65bfebf3c43f7a9a7c951159d095738fc4b6

Contents?: true

Size: 698 Bytes

Versions: 3

Compression:

Stored size: 698 Bytes

Contents

describe GoogleSslCert::CLI do
  before(:all) do
    @args = "--from Tung"
  end

  describe "google-ssl-cert" do
    it "hello" do
      out = execute("exe/google-ssl-cert hello world #{@args}")
      expect(out).to include("from: Tung\nHello world")
    end

    commands = {
      "hell" => "hello",
      "hello" => "name",
      "hello -" =>  "--from",
      "hello name" => "--from",
      "hello name --" => "--from",
    }
    commands.each do |command, expected_word|
      it "completion #{command}" do
        out = execute("exe/google-ssl-cert completion #{command}")
        expect(out).to include(expected_word) # only checking for one word for simplicity
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
google-ssl-cert-0.2.1 spec/cli_spec.rb
google-ssl-cert-0.2.0 spec/cli_spec.rb
google-ssl-cert-0.1.0 spec/cli_spec.rb