Suggest different variables to use if we want to tunnel both v4 and v6
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / to_bytes_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'to_bytes function' do
4   describe 'success' do
5     pp = <<-DOC
6       $o = to_bytes('4 kB')
7       notice(inline_template('to_bytes is <%= @o.inspect %>'))
8     DOC
9     it 'converts kB to B' do
10       apply_manifest(pp, :catch_failures => true) do |r|
11         m = r.stdout.match(%r{to_bytes is (\d+)\D})
12         expect(m[1]).to eq('4096')
13       end
14     end
15     it 'works without the B in unit'
16     it 'works without a space before unit'
17     it 'works without a unit'
18     it 'converts fractions'
19   end
20   describe 'failure' do
21     it 'handles no arguments'
22     it 'handles non integer arguments'
23     it 'handles unknown units like uB'
24   end
25 end