- Timecop.freeze(Time.utc(2007, 1, 1, 0, 30, 0))
- get :changes
- assert_response :success
- # print @response.body
- # As we have loaded the fixtures, we can assume that there are some
- # changes at the time we have frozen at
- now = Time.now.getutc
- hourago = now - 1.hour
- assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']", :count => 1 do
- assert_select "changes[starttime='#{hourago.xmlschema}'][endtime='#{now.xmlschema}']", :count => 1 do
- assert_select "tile", :count => 6
+ travel_to Time.utc(2007, 1, 1, 0, 30, 0) do
+ get :changes
+ assert_response :success
+ # print @response.body
+ # As we have loaded the fixtures, we can assume that there are some
+ # changes at the time we have frozen at
+ now = Time.now.getutc
+ hourago = now - 1.hour
+ assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']", :count => 1 do
+ assert_select "changes[starttime='#{hourago.xmlschema}'][endtime='#{now.xmlschema}']", :count => 1 do
+ assert_select "tile", :count => 6
+ end