Sha256: ae7e6915bb21a5070df35da0734f83820f58a6adf9e20dd1f3572571dd533c49
Contents?: true
Size: 1010 Bytes
Versions: 6
Compression:
Stored size: 1010 Bytes
Contents
#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do describe 'success' do it 'uniques arrays' do pp = <<-EOS $a = ["wallless", "wallless", "brrr", "goddessship"] $o = unique($a) notice(inline_template('unique is <%= @o.inspect %>')) EOS apply_manifest(pp, :catch_failures => true) do |r| expect(r.stdout).to match(/unique is \["wallless", "brrr", "goddessship"\]/) end end it 'uniques strings' do pp = <<-EOS $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" $o = unique($a) notice(inline_template('unique is <%= @o.inspect %>')) EOS apply_manifest(pp, :catch_failures => true) do |r| expect(r.stdout).to match(/unique is "wales prohytingcmbd"/) end end end describe 'failure' do it 'handles no arguments' it 'handles non strings or arrays' end end
Version data entries
6 entries across 6 versions & 1 rubygems