mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
eb6bccb3e3
By being a little bit less strict in our assertions, we can still prove the behaviour is correct, without having to freeze / travel time.
5 lines
126 B
Ruby
5 lines
126 B
Ruby
RSpec::Matchers.define :be_about_now do
|
|
match do |actual|
|
|
expect(actual).to be_within(2.seconds).of(Time.now)
|
|
end
|
|
end
|