Skip to content

Instantly share code, notes, and snippets.

@octosteve
Created April 26, 2016 20:28
Show Gist options
  • Save octosteve/822544102b50501d06ea7508a7f22a6c to your computer and use it in GitHub Desktop.
Save octosteve/822544102b50501d06ea7508a7f22a6c 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)
buffer == "Feet"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment