Skip to content

Commit

Permalink
Merge pull request #13 from astery/move-event-assertions
Browse files Browse the repository at this point in the history
Move event assertions from tests to library
  • Loading branch information
slashdotdash committed Sep 30, 2016
2 parents c85a142 + 808619d commit dedce24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Commanded.Extensions.EventAssertions do
use ExUnit.Case
defmodule Commanded.Assertions.EventAssertions do
import ExUnit.Assertions

def assert_receive_event(event_type, assertion) do
assert_receive_event(event_type, assertion, skip: 0)
Expand Down
3 changes: 1 addition & 2 deletions test/process_managers/process_manager_routing_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ defmodule Commanded.ProcessManager.ProcessManagerRoutingTest do
use ExUnit.Case
doctest Commanded.ProcessManagers.ProcessRouter

alias Commanded.Extensions
alias Commanded.ProcessManagers.ProcessRouter
alias Commanded.ExampleDomain.TransferMoneyProcessManager
alias Commanded.ExampleDomain.{OpenAccountHandler,DepositMoneyHandler,TransferMoneyHandler,WithdrawMoneyHandler}
Expand All @@ -12,7 +11,7 @@ defmodule Commanded.ProcessManager.ProcessManagerRoutingTest do
alias Commanded.ExampleDomain.MoneyTransfer.Commands.{TransferMoney}
alias Commanded.ExampleDomain.MoneyTransfer.Events.{MoneyTransferRequested}

import Extensions.EventAssertions
import Commanded.Assertions.EventAssertions

setup do
EventStore.Storage.reset!
Expand Down
2 changes: 1 addition & 1 deletion test/process_managers/resume_process_manager_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Commanded.ProcessManager.ResumeProcessManagerTest do
alias Commanded.Helpers.Wait
alias Commanded.ProcessManagers.ProcessRouter

import Extensions.EventAssertions
import Commanded.Assertions.EventAssertions

setup do
EventStore.Storage.reset!
Expand Down
1 change: 0 additions & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ExUnit.start()

Code.require_file("event_assertions.ex", "test/extensions")
Code.require_file("process.ex", "test/extensions")

0 comments on commit dedce24

Please sign in to comment.