Project

traitr

0.0
No commit activity in last 3 years
No release in over 3 years
a lightweight, simplified, pure-ruby way to handle object model construction, similar to FactoryGirl.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

traitr

A lightweight system-agnostic spin on FactoryGirl.

Traitor has no DSLs and has no dependencies. It does one thing: allow you to group key/value pairs to a name, and then use that to easily build objects.

Documentation

See GETTING_STARTED for information on defining and using traitors.

Install

Add the following line to Gemfile:

gem 'traitr'

and run bundle install from your shell.

To install the gem manually from your shell, run:

gem install traitr

Once you've got it installed, in your spec_helper, use

require 'traitor'
Traitor::Config.configure_for_rails!

or explicitly define Traitor::Config.create_method, Traitor::Config.create_kwargs, and Traitor::Config.build_kwargs.

WARNING: This gem is not related to nor compatible with txus/traitor, which is traitor on rubygems.org