create mock_helpers for tests
This commit is contained in:
parent
ed7c6bf5cc
commit
50bcca9772
1 changed files with 20 additions and 0 deletions
20
test/support/mock_helpers.ex
Normal file
20
test/support/mock_helpers.ex
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
defmodule Aprs.MockHelpers do
|
||||
@moduledoc """
|
||||
Provides mocks and stubs for tests.
|
||||
"""
|
||||
|
||||
alias Aprs.BadPacket
|
||||
alias Aprs.Packets
|
||||
|
||||
def stub_packets_mock do
|
||||
Mox.defmock(PacketsMock, for: Packets)
|
||||
|
||||
Mox.stub_with(PacketsMock, PacketsStub)
|
||||
end
|
||||
|
||||
def stub_badpackets_mock do
|
||||
Mox.defmock(BadPacketsMock, for: BadPacket)
|
||||
|
||||
Mox.stub_with(BadPacketsMock, BadPacketsStub)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue