diff --git a/spec/classes/collectd_plugin_genericjmx_spec.rb b/spec/classes/collectd_plugin_genericjmx_spec.rb index 96ff5b771..adc8cee2a 100644 --- a/spec/classes/collectd_plugin_genericjmx_spec.rb +++ b/spec/classes/collectd_plugin_genericjmx_spec.rb @@ -29,7 +29,7 @@ should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').with({ :order => '00', :target => config_filename, - :content => /\s+LoadPlugin "org\.collectd\.java\.GenericJMX"\s+/s + :content => /.+LoadPlugin "org\.collectd\.java\.GenericJMX".+/m }) end @@ -37,7 +37,7 @@ should contain_concat__fragment('collectd_plugin_genericjmx_conf_footer').with({ :order => '99', :target => config_filename, - :content => %r{\s+}s, + :content => %r{.+}m, }) end @@ -55,7 +55,7 @@ context 'jvmarg parameter array' do let (:params) {{ :jvmarg => %w{ foo bar baz } }} it 'should have multiple jvmarg parameters' do - should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').with_content(/JVMArg "foo"\s*JVMArg "bar"\s*JVMArg "baz"/s) + should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').with_content(/JVMArg "foo".*JVMArg "bar".*JVMArg "baz"/m) end end @@ -65,7 +65,7 @@ should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').with_content(/JVMArg "bat"/) end it 'should have ONLY one jvmarg parameter' do - should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').without_content(/(.*JVMArg.*){2,}/s) + should contain_concat__fragment('collectd_plugin_genericjmx_conf_header').without_content(/(.*JVMArg.*){2,}/m) end end diff --git a/spec/classes/collectd_plugin_java_spec.rb b/spec/classes/collectd_plugin_java_spec.rb index cc74f0bd0..ad5bb2fa7 100644 --- a/spec/classes/collectd_plugin_java_spec.rb +++ b/spec/classes/collectd_plugin_java_spec.rb @@ -31,7 +31,7 @@ }} it 'will have multiple jvmarg parameters' do - should contain_collectd__plugin('java').with_content(/JVMArg "foo"[\s\n]+JVMArg "bar"[\s\n]+JVMArg "baz"/) + should contain_collectd__plugin('java').with_content(/JVMArg "foo".+JVMArg "bar".+JVMArg "baz"/m) end end @@ -45,7 +45,7 @@ end it 'will only have one JVMArg parameter' do - should contain_collectd__plugin('java').without_content(/(.*JVMArg.*){2,}/) + should contain_collectd__plugin('java').without_content(/(.*JVMArg.*){2,}/m) end end