logstash/logstash — pull request #904 by pitkley (2013-12-30 19:32:42+00:00)
Title: The spec "support/date-http" can fail on a non-english machine

Running `make test` or `./bin/logstash rspec spec/support/date-http.rb` failed on my (german) machine with the following error:

Failures:
1) http dates "{"timestamp":"25/Mar/2013:20:33:56 +0000"}" when processed
Failure/Error: Unable to find matching line from backtrace
Insist::Failure:
Expected "2013-03-25T20:33:56.000Z", but got "2013-12-30T17:09:27.660Z"
# ./spec/support/date-http.rb:15:in `(root)'
# ./lib/logstash/runner.rb:154:in `run'

Finished in 0.108 seconds
1 example, 1 failure

Failed examples:
rspec ./spec/test_utils.rb:88 # http dates "{"timestamp":"25/Mar/2013:20:33:56 +0000"}" when processed

The reason is that Joda fails to parse the month abbreviation `Mar` using the german locale, thus I added `locale => "en"` to ensure that the test doesn't fail.

I haven't checked the other `date`-tests yet; although they did not fail for me, there could be edge-cases for other locales.