Skip to content

ityonemo/multiverses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiverses

Multiverses for Elixir.

Don't let Mox, Ecto, Hound and Wallaby have ALL the fun!

Wubba dubba lub lub!

Usage

add a line into the configuration (typically test.exs):

If you'd like to drop in multiverse sharding for registry

# config.exs
config :my_app, Registry, Registry
# test.exs
config :my_app, Registry, Multiverses.Registry
defmodule MyModule do
  @registry Application.config_env!(:my_app, Registry)

  def my_function(...) do
    # uses Multiverses.Registry when enabled.
    @registry.unregister(...)
  end
end

Testing

you can activate multiple copies of all the tests by passing the REPLICATION system environment variable:

REPLICATION=10 mix test

will copy the test modules 10 times over, so multiple versions of the same module could possibly run simultaneously.

Installation

The package can be installed by adding multiverses to your list of dependencies in mix.exs:

def deps do
  [
    {:multiverses, "~> 0.11.0", only: :test}
  ]
end

Documentation can be found at https://hexdocs.pm/multiverses.

About

multiverse support for elixir

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages