mirror of
https://github.com/tailix/libkernaux.git
synced 2025-07-07 18:51:58 -04:00
Ruby: add specs for method KernAux.cmdline
This commit is contained in:
parent
b73bbc2643
commit
d9dc6c38d8
1 changed files with 15 additions and 0 deletions
15
pkgs/ruby/spec/lib/kernaux/cmdline_spec.rb
Normal file
15
pkgs/ruby/spec/lib/kernaux/cmdline_spec.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue