Created
March 6, 2015 16:51
-
-
Save batate/eae00e49fcee1b2a2a7a to your computer and use it in GitHub Desktop.
one experiment, multiple measurements
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
test "chat" do | |
bucket = create_bucket | |
assert %{__struct__: "Bucket"} = bucket | |
assert Bucket.empty?(bucket) | |
Bucket.add(bucket, 1) | |
assert bucket.contents == [1] | |
end | |
# instead | |
setup context do | |
assign bucket: create_bucket | |
end | |
should "create bucket", context do | |
assert %{__struct__: "Bucket"} = context.bucket | |
assert Bucket.empty?(bucket) | |
end | |
should "be empty", context do | |
assert Bucket.empty?(bucket) | |
end | |
should "add to bucket", context do | |
Bucket.add(bucket, 1) | |
assert bucket.contents == 1 | |
end | |
should "remove from bucket", context ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment