Permalink
Browse files

Fix tests for ruby 1.8.7

Change-Id: Ib9f9c694ff2ba550534c04655f9894e6beb7ece6
  • Loading branch information...
avsej committed Apr 10, 2012
1 parent 34684d7 commit c53380b96ae5860ae639206f419f5d3386717fb6
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/test_model.rb
View
@@ -21,7 +21,7 @@ class Post < Couchbase::Model
attribute :title
attribute :body
attribute :author, :default => 'Anonymous'
- attribute :created_at, :default => lambda { Time.new("2010-01-01") }
+ attribute :created_at, :default => lambda { Time.utc("2010-01-01") }
end
class TestModel < MiniTest::Unit::TestCase
@@ -52,7 +52,7 @@ def test_uses_default_value_or_nil
def test_allows_lambda_as_default_value
post = Post.new(:title => "Hello, world")
- expected = Time.new("2010-01-01")
+ expected = Time.utc("2010-01-01")
assert_equal expected, post.created_at
assert_equal expected, post.attributes[:created_at]
end

0 comments on commit c53380b

Please sign in to comment.