On 18 February 2015 at 01:03, Cezinha Anjos <[email protected]> wrote: > Hi! > > I have two projects running Rails 4.2 and using travel_to from > ActiveSupport::Testing::TimeHelpers. > > In one project everything is working perfectly. But in the second one, my > specs are running with the current date/time instead of using travel_to. > Here is one example: > > it "is only a travel_to test" do > travel_to Time.new(2012, 1, 1, 1, 1, 1) do > expect(Time.new).to eq Time.new(2012, 1, 1, 1, 1, 1) > end > end > > I've already set the rails_helper.rb with: > > RSpec.configure do |config| > ... > config.include ActiveSupport::Testing::TimeHelpers > end > > Does anyone know what's going on?
What do Time.current and Time.now give you inside the block? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvHWzjwnoEirh09pBdTfCUA64OpoPvxJYkiYzih0pHW%2BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

