     end
 
     test "validate/2 with a valid value", %{schema: schema} do
-      assert Xema.validate(schema, 1) == :ok
-    end
-
-    test "validate/2 with an invalid value", %{schema: schema} do
-      assert Xema.validate(schema, "1") ==
-               {:error, %{type: :integer, value: "1"}}
+      assert validate(schema, 1) == :ok
+    end
+
+    test "validate/2 with an invalid value", %{schema: schema} do
+      assert validate(schema, "1") == {:error, %{type: :integer, value: "1"}}
     end
   end
 

    end

    test "validate/2 with a valid value", %{schema: schema} do
      assert Xema.validate(schema, %{name: "foo"}) == :ok
      assert Xema.validate(schema, %{name: nil}) == :ok
    end

    test "validate/2 with an invalid value", %{schema: schema} do
      assert Xema.validate(schema, %{name: 1}) ==
               {:error,
                %{
                  properties: %{

    end

    test "validate/2 with a valid value", %{schema: schema} do
      assert validate(schema, 1) == :ok
    end

    test "validate/2 with an invalid value", %{schema: schema} do
      assert validate(schema, "1") == {:error, %{type: :integer, value: "1"}}
    end
  end

