We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ca406c commit 5b8b860Copy full SHA for 5b8b860
1 file changed
spec/acceptance/type3x_spec.rb
@@ -0,0 +1,28 @@
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
18
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
27
28
+end
0 commit comments