1 2 3 4 5 6 7 8 9 10 11
|
# frozen_string_literal: true
require 'spec_helper'
describe 'regsubst' do
# used to test the fact that expected result can be a regexp
it { is_expected.to run.with_params('thisisatest', '^192', '254').and_return(/sat/) }
it { is_expected.to run.with_params('thisisatest', 'sat', 'xyz').and_return(/ixyze/) }
it { is_expected.to run.with_params('thisisatest', 'sat', 'xyz').and_return('thisixyzest') }
it { is_expected.to run.with_params('thisisatest', 'sat', 'xyz').and_return(/^thisixyzest$/) }
end
|