Last active
December 19, 2015 06:49
-
-
Save kblake/5914269 to your computer and use it in GitHub Desktop.
Amrita + Elixir setup and files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Erlang R16B | |
# Elixir 0.9.3 | |
# amrita 0.1.3 | |
# mix.exs ##################################### | |
defmodule AmritaSandbox.Mixfile do | |
use Mix.Project | |
def project do | |
[ app: :amrita_sandbox, | |
version: "0.0.1", | |
deps: deps ] | |
end | |
# Configuration for the OTP application | |
def application do | |
[] | |
end | |
# Returns the list of dependencies in the format: | |
# { :foobar, "0.1", git: "https://github.com/elixir-lang/foobar.git" } | |
defp deps do | |
[{:amrita, "0.1.3", github: "josephwilk/amrita"}] | |
end | |
end | |
# test/test_helper.exs ####################################################### | |
Amrita.start | |
# test/amrita_sandbox_test.exs ############################################### | |
Code.require_file "test_helper.exs", __DIR__ | |
defmodule AmritaSandboxTest do | |
use Amrita.Sweet | |
fact "1 equals 2" do | |
1 |> equals 2 | |
end | |
facts "foo" do | |
fact "bar" do | |
[1, 2, 4, 5] |> contains 4 | |
{6, 7, 8, 9} |> contains 9 | |
end | |
end | |
end | |
# test output ############################################ | |
👉 dudeman:amrita_sandbox$ mix test | |
F. | |
Failures: | |
1) fact 1 equals 2 (AmritaSandboxTest) | |
** (Amrita.FactError) Expected: | |
1 |> equals(2) | |
at test/amrita_sandbox_test.exs:7 | |
Finished in 0.06 seconds (0.06s on load, 0.00s on tests) | |
2 facts, 1 failures | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment