Delorean - mock Ruby's with style

Delorean photo courtesy Giancarlo Pitocco

At The Changelog, we give bonus points for witty project names. How could we pass up a repo named Delorean.

Delorean is a smart way to mock Ruby’s method thereby allowing you to travel in time. Why is this helpful? Testing. Consider the following spec from the README:

it "should show latest created user" do

  time_travel_to(3.minutes.ago) { create_user :name => "John"  }
  time_travel_to(5.minutes.ago) { create_user :name => "Chris" }

  get 'show'

  response.should have_text("John")
  response.should_not have_text("Chris")


Want to get back to 1985?

after(:each) { back_to_the_present }


[Source on GitHub] [Back to the Future on IMDB for you youngsters]

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

Beyond Code: Season 3 / GopherCon 2015

0:00 / 0:00