ecto_validation_case alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view ecto_validation_case alternatives based on common mentions on social networks and blogs.
-
ecto
A toolkit for data mapping and language integrated query. -
memento
Simple + Powerful interface to the Mnesia Distributed Database 💾 -
paper_trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history. -
ExAudit
Ecto auditing library that transparently tracks changes and can revert them. -
xandra
Fast, simple, and robust Cassandra/ScyllaDB driver for Elixir. -
ecto_psql_extras
Ecto PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more. -
ecto_mnesia
Ecto adapter for Mnesia Erlang term database. -
timex_ecto
An adapter for using Timex DateTimes with Ecto -
arbor
Ecto elixir adjacency list and tree traversal. Supports Ecto versions 2 and 3. -
sqlitex
An Elixir wrapper around esqlite. Allows access to sqlite3 databases. -
boltun
Transforms notifications from the Postgres LISTEN/NOTIFY mechanism into callback execution -
sql_dust
Easy. Simple. Powerful. Generate (complex) SQL queries using magical Elixir SQL dust. -
walex
Listen to Postgres change events and do stuff with the data directly in Elixir -
neo4j_sips
Elixir driver for the Neo4j graph database server
Learn any GitHub repo in 59 seconds
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ecto_validation_case or a related project?
README
Ecto.ValidationCase
Simplify your Ecto model validation tests. Loosely inspired by shoulda matchers, but simpler.
IMPORTANT
Jose Valim, creator of Elixir, has outlined a better approach to this problem here: https://groups.google.com/forum/#!topic/elixir-lang-talk/kwLLyCiarls
Go check it out.
Sample
defmodule MyApp.UserTest do
use ExUnit.Case
use Ecto.ValidationCase, model: MyApp.User
test "requires password to be 10 chars long" do
rejects "password", for: :password, message: "too short"
accepts "password123", for: :password
end
end
Rationale
Rather than create a matching test helper function for each of the valiations
that Ecto supports, this library intentionally keeps things simple,
providing only accepts/2
and rejects/2
. Why?
- The api very easy to remember, which makes validation tests more likely to be written.
- The tests are more explicit, with a minimum of magic. It is very clear exactly what values are being tested, for which fields, and which error messages should be returned.
Installation
You can install Ecto.ValidationCase
from hex. First, change your deps
in
mix.exs
specifying that this is applicable only for the test environment:
def deps do
[{:ecto_validation_case, ">= 0.1.0", env: :test}]
end
Then run mix deps.get
to install.
Documentation
Documentation is available on Ecto.ValidationCase
's hex page.
License
*Note that all licence references and agreements mentioned in the ecto_validation_case README section above
are relevant to that project's source code only.