chronoscope/test/support/mocks.ex

12 lines
367 B
Elixir

defmodule Chronoscope.DateTime.Behaviour do
@callback utc_now :: DateTime.t()
end
defmodule Chronoscope.DateTime.Stub do
@behaviour Chronoscope.DateTime.Behaviour
def utc_now(), do: DateTime.utc_now()
end
Mox.defmock(Chronoscope.NTS.BehaviourMock, for: Chronoscope.NTS.Behaviour)
Mox.defmock(Chronoscope.NTS.DateTimeMock, for: Chronoscope.DateTime.Behaviour)