File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env ruby -S rspec
2+ require 'spec_helper_acceptance'
3+
4+ describe 'type3x function' do
5+ describe 'success' do
6+ {
7+ %{type3x({ 'a' => 'hash' })} => 'Hash' ,
8+ %{type3x(['array'])} => 'Array' ,
9+ %{type3x(false)} => 'Boolean' ,
10+ %{type3x('asdf')} => 'String' ,
11+ %{type3x(242)} => 'Integer' ,
12+ %{type3x(3.14)} => 'Float' ,
13+ } . each do |pp , type |
14+ it "with type #{ type } " do
15+ apply_manifest ( pp , :catch_failures => true )
16+ end
17+ end
18+ end
19+
20+ describe 'failure' do
21+ pp_fail = <<-EOS
22+ type3x('one','two')
23+ EOS
24+ it 'handles improper number of arguments' do
25+ expect ( apply_manifest ( pp_fail , :expect_failures => true ) . stderr ) . to match ( %r{Wrong number of arguments} )
26+ end
27+ end
28+ end
You can’t perform that action at this time.
0 commit comments