Skip to content

Commit 471104d

Browse files
committed
Add basic tests for environment functions
1 parent 6e29538 commit 471104d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Puppet::Functions.create_function(:'environment::upcase') do
2+
dispatch :up do
3+
param 'String', :some_string
4+
end
5+
6+
def up(some_string)
7+
some_string.upcase
8+
end
9+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require 'spec_helper'
2+
3+
describe 'environment::upcase' do
4+
it { should run.with_params('aaa').and_return('AAA') }
5+
end

0 commit comments

Comments
 (0)