source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/functions/abs_spec.rb@ 30903

Last change on this file since 30903 was 30903, checked in by davidb, 8 years ago

Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1require 'spec_helper'
2
3describe 'abs' do
4 it { is_expected.not_to eq(nil) }
5
6 describe 'signature validation in puppet3', :unless => RSpec.configuration.puppet_future do
7 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
8 it {
9 pending("Current implementation ignores parameters after the first.")
10 is_expected.to run.with_params(1, 2).and_raise_error(Puppet::ParseError, /wrong number of arguments/i)
11 }
12 end
13
14 describe 'signature validation in puppet4', :if => RSpec.configuration.puppet_future do
15 it { pending "the puppet 4 implementation"; is_expected.to run.with_params().and_raise_error(ArgumentError) }
16 it { pending "the puppet 4 implementation"; is_expected.to run.with_params(1, 2).and_raise_error(ArgumentError) }
17 it { pending "the puppet 4 implementation"; is_expected.to run.with_params([]).and_raise_error(ArgumentError) }
18 it { pending "the puppet 4 implementation"; is_expected.to run.with_params({}).and_raise_error(ArgumentError) }
19 it { pending "the puppet 4 implementation"; is_expected.to run.with_params(true).and_raise_error(ArgumentError) }
20 end
21
22 it { is_expected.to run.with_params(-34).and_return(34) }
23 it { is_expected.to run.with_params("-34").and_return(34) }
24 it { is_expected.to run.with_params(34).and_return(34) }
25 it { is_expected.to run.with_params("34").and_return(34) }
26 it { is_expected.to run.with_params(-34.5).and_return(34.5) }
27 it { is_expected.to run.with_params("-34.5").and_return(34.5) }
28 it { is_expected.to run.with_params(34.5).and_return(34.5) }
29 it { is_expected.to run.with_params("34.5").and_return(34.5) }
30end
Note: See TracBrowser for help on using the repository browser.