Skip to content

Instantly share code, notes, and snippets.

@octosteve
Last active April 26, 2016 20:29
Show Gist options
  • Save octosteve/fd64367a8b80414c3bfa445532e33012 to your computer and use it in GitHub Desktop.
Save octosteve/fd64367a8b80414c3bfa445532e33012 to your computer and use it in GitHub Desktop.
defmodule ProcessesInElixirTest do
use ExUnit.Case
import ExUnit.CaptureIO
test "handles {:print_success} properly" do
pid = spawn(ProcessesInElixir, :loop, [])
assert capture_io(fn ->
send pid, {:print_success}
end) == "Success!"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment