Setting Today in a Test
Ruby is awesome…
def test_on_weekday
today_is "May 3, 2006" do
calendar.add("a call").at(4.pm).on(:saturday)
assert_equal(Time.local(2006, 5, 6, 16),
calendar.appointments.first.start)
end
end
…playing with code examples for our book.
Tags: ruby, testing
This entry was posted
on Wednesday, December 20th, 2006 at 7:42 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.