middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
325 stars 179 forks source link

Tests failing due to date issues #205

Closed adamesque closed 10 years ago

adamesque commented 10 years ago

Most tests are failing for me out of the box:

Given the Server is running at "summary-app"                   # middleman-dc3d4f9fd513/middleman-core/lib/middleman-core/step_definitions/server_steps.rb:61
      wrong number of arguments (1 for 0) (ArgumentError)
      ./lib/middleman-blog/blog_article.rb:167:in `date'
      ./lib/middleman-blog/blog_data.rb:154:in `permalink_options'
      ./lib/middleman-blog/blog_data.rb:173:in `template_path'
      ./lib/middleman-blog/blog_data.rb:97:in `block in manipulate_resource_list'
      ./lib/middleman-blog/blog_data.rb:80:in `each'
      ./lib/middleman-blog/blog_data.rb:80:in `manipulate_resource_list'
      features/summary.feature:32:in `Given the Server is running at "summary-app"'

The offending line is a call to Time.zone.parse:

@_date = Time.zone.parse(frontmatter_date.to_s)
adamesque commented 10 years ago

Looks like there's a piece of ActiveSupport's core_ext that needs to be required but isn't; doing a blanket require 'active_support/core_ext' at the top of blog_article.rb gets us back into the green.

naotaka commented 10 years ago

I was suffering from this error. Thank you for fixing it.