Sha256: b154c3ef184d5a97efa27604ebc6513e674707b38eb90911061aef6d33e2be86
Contents?: true
Size: 658 Bytes
Versions: 2
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' require 'appmap/util' describe AppMap::Util do let(:subject) { AppMap::Util.method(:scenario_filename) } describe 'scenario_filename' do it 'leaves short names alone' do expect(subject.call('foobar')).to eq('foobar.appmap.json') end it 'has a customizable suffix' do expect(subject.call('foobar', extension: '.json')).to eq('foobar.json') end it 'limits the filename length' do fname = (0...104).map { |i| ((i % 26) + 97).chr }.join expect(subject.call(fname, max_length: 50)).to eq('abcdefghijklmno-RAd_SFbH1sUZ_OXfwPsfzw.appmap.json') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
appmap-0.28.1 | spec/util_spec.rb |
appmap-0.28.0 | spec/util_spec.rb |