Permalink
Browse files

Add spec for espec_helper

  • Loading branch information...
benmmurphy committed Dec 27, 2011
1 parent 79c6d2e commit d5d2c548892f26cf22a032d19d9c2fe843a86756
Showing with 16 additions and 0 deletions.
  1. +16 −0 spec/espec_helper_spec.erl
View
@@ -0,0 +1,16 @@
+-module(espec_helper_spec).
+-include("espec.hrl").
+
+spec() ->
+ describe("setting and getting values", fun() ->
+
+ it("should return the last value that was set", fun() ->
+ espec_helper:spec_set(key, "value1"),
+ espec_helper:spec_set(key, "value2"),
+ ?assertEqual("value2", espec_helper:spec_get(key))
+ end),
+
+ it("should return undefined if no value was set", fun() ->
+ ?assertEqual(undefined, espec_helper:spec_get(key))
+ end)
+ end).

0 comments on commit d5d2c54

Please sign in to comment.