1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-06-30 18:42:46 -04:00

Ruby: add specs for method KernAux.cmdline

This commit is contained in:
Alex Kotov 2022-01-22 05:30:30 +05:00
parent b73bbc2643
commit d9dc6c38d8
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe KernAux, '.cmdline' do
subject(:cmdline) { described_class.cmdline str }
let(:str) { 'foo bar\\ baz "car cdr"' }
it { is_expected.to be_instance_of Array }
it { is_expected.to be_frozen }
it { is_expected.to all be_instance_of String }
it { is_expected.to all be_frozen }
it { is_expected.to eq ['foo', 'bar baz', 'car cdr'] }
end