source: other-projects/hathitrust/vagrant-hadoop-cluster/trunk/modules/stdlib/spec/acceptance/getvar_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: 671 bytes
Line 
1#! /usr/bin/env ruby -S rspec
2require 'spec_helper_acceptance'
3
4describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5 describe 'success' do
6 it 'getvars from classes' do
7 pp = <<-EOS
8 class a::data { $foo = 'aoeu' }
9 include a::data
10 $b = 'aoeu'
11 $o = getvar("a::data::foo")
12 if $o == $b {
13 notify { 'output correct': }
14 }
15 EOS
16
17 apply_manifest(pp, :catch_failures => true) do |r|
18 expect(r.stdout).to match(/Notice: output correct/)
19 end
20 end
21 end
22 describe 'failure' do
23 it 'handles improper argument counts'
24 it 'handles non-numbers'
25 end
26end
Note: See TracBrowser for help on using the repository browser.