就是我的测试在设置时区以前都是正确的,当我在application.rb文件中进行了如下设置:
config.time_zone = 'Beijing' config.active_record.default_timezone = 'Beijing' 之后就包错了:
expected: "{\"created_at\":\"2013-04-19T01:16:45+08:00\",\"id\":1,\"status\":\"undo\",\"task_name\":\"learn css\",\"updated_at\":\"2013-04-19T01:16:45+08:00\",\"user_id\":1}" got: "{\"created_at\":\"2013-04-18T17:16:45+08:00\",\"id\":1,\"status\":\"undo\",\"task_name\":\"learn css\",\"updated_at\":\"2013-04-18T17:16:45+08:00\",\"user_id\":1}"
请问大家这个怎么解决啊?(我用的是 rspec 测试)