25 Nov '15, 1am

factory_girl for Elixir. https://t.co/zOfB5kGwNC #elixir #ruby #rails

ExMachina makes it easy to generate Elixir test data using factories. It works out of the box with Ecto associations and embeds, and can be easily composed to make creating data extremely flexible. defmodule MyApp.Factory do use ExMachina.Ecto, repo: MyApp.Repo def factory(:user, _attrs) do %User{ name: "Jane Smith", email: sequence(:email, fn(n) -> "email-#{n}@example.com" end) } end def factory(:article, attrs) do %Article{ title: "Use ExMachina!", # Use the :author from the attrs if it exists, otherwise build a new :user author: assoc(attrs, :author, factory: :user) } end end ExMachina is simple enough to use like this… user = create(:user, name: "Kanye West") articles = create_pair(:article, author: user) …but flexible enough to use like this: def make_admin(user) do %{user | admin: true} end build(:user) |> make_admin |> create Flexibility is a feature ExMachina striv...

Full article: https://robots.thoughtbot.com/announcing-ex-machina

Tweets

ExMessenger Exercise: Understanding Nodes in El...

akitaonrails.com 25 Nov '15, 3pm

I was exercising through this 2014's old blog post by Drew Kerrigan where he builds a bare bones, command line-based, chat...

Observing Processes in Elixir - The Little Elixir & OTP Guidebook

Observing Processes in Elixir - The Little Elix...

akitaonrails.com 22 Nov '15, 5pm

In my journey to really understand how a proper Elixir application should be written I am exercising through Benjamin Tan ...

28 days, 11 blog posts, learning Elixir. This is thus series' conclusion, check it out. https://t.co/xdBAXs73N5 cc @elix…

28 days, 11 blog posts, learning Elixir. This i...

akitaonrails.com 25 Nov '15, 8pm

If you must deal with external resources, be it a File, or a Network Connections, or anything outside of the Erlang VM, yo...

“Elixir quickly reminds you of the joys of prog...

akitaonrails.com 26 Nov '15, 12pm

I like to know what my tools are capable of, because that says how and where I can use them. I will not bore you by statin...

#workfromhome Integrate Design to Ruby on Rails...

freelancer.com 25 Nov '15, 1pm

We got a ticketing application in Ruby On Rails, now we need to customize its UI for the Agents and the customers. We will...

Hey! @stuk_io is looking for a Ruby on Rails En...

landing.jobs 24 Nov '15, 4pm

We're looking for a kickass Ruby on Rails developer to join our awesome team at this lovely city called Porto. If you're c...