While developing spec tests for a Puppet module, TravisCI tests against various Ruby/Gem/Puppet versions. Often all tests work on all versions except with Ruby 1.8.7. There the tests don't even start. Instead you get an error that mentions configuration.rb:1105
and syntax error, unexpected ')'
.
Here is one example:
/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load': /home/travis/build/puppetlabs/puppetlabs-haproxy/spec/classes/haproxy_spec.rb:347: syntax error, unexpected ')' (SyntaxError)
/home/travis/build/puppetlabs/puppetlabs-haproxy/spec/classes/haproxy_spec.rb:355: syntax error, unexpected kDO_BLOCK, expecting kEND
/home/travis/build/puppetlabs/puppetlabs-haproxy/spec/classes/haproxy_spec.rb:364: syntax error, unexpected $end, expecting kEND
I've seen this on multiple projects.
How to fix this?