From 3fc7694d9fd46b4647eb562170af48ed819f64ab Mon Sep 17 00:00:00 2001 From: tphoney Date: Tue, 21 Feb 2017 15:12:08 +0000 Subject: remove unsupported platforms and future parser --- spec/acceptance/type_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/acceptance/type_spec.rb') diff --git a/spec/acceptance/type_spec.rb b/spec/acceptance/type_spec.rb index 67e3248..7cf445b 100755 --- a/spec/acceptance/type_spec.rb +++ b/spec/acceptance/type_spec.rb @@ -1,29 +1,29 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'type function', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) || is_future_parser_enabled?) do +describe 'type function' do describe 'success' do it 'types arrays' do pp = <<-EOS $a = ["the","public","art","galleries"] # Anagram: Large picture halls, I bet $o = type($a) - notice(inline_template('type is <%= @o.inspect %>')) + notice(inline_template('type is <%= @o.to_s %>')) EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/type is "array"/) + expect(r.stdout).to match(/type is Tuple\[String, String, String, String\]/) end end it 'types strings' do pp = <<-EOS $a = "blowzy night-frumps vex'd jack q" $o = type($a) - notice(inline_template('type is <%= @o.inspect %>')) + notice(inline_template('type is <%= @o.to_s %>')) EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/type is "string"/) + expect(r.stdout).to match(/type is String/) end end it 'types hashes' -- cgit v1.2.3 From afc313bb81013473dd12a578fe652ebdd07b179a Mon Sep 17 00:00:00 2001 From: tphoney Date: Tue, 28 Feb 2017 18:07:56 +0000 Subject: loosen the regex for tuple checking --- spec/acceptance/type_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/acceptance/type_spec.rb') diff --git a/spec/acceptance/type_spec.rb b/spec/acceptance/type_spec.rb index 7cf445b..5cc9470 100755 --- a/spec/acceptance/type_spec.rb +++ b/spec/acceptance/type_spec.rb @@ -12,7 +12,7 @@ describe 'type function' do EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/type is Tuple\[String, String, String, String\]/) + expect(r.stdout).to match(/type is Tuple\[String.*, String.*, String.*, String.*\]/) end end it 'types strings' do -- cgit v1.2.3