astroband / ruby-stellar-base

The stellar-base library is the lowest-level stellar helper library. It consists of classes to read, write, hash, and sign the xdr structures that are used in stellar-core
Apache License 2.0
22 stars 19 forks source link

Add factories for ledger, transaction, operation #42

Closed ramontayag closed 5 years ago

ramontayag commented 5 years ago

Having factories aids in testing for developers that use this gem. The file is included in lib, but isn't loaded unless require 'stellar-base/factories'.

The downside is that the file is shipped into production, so will take up disk space, but it will not be loaded into memory.

The upside is that the developer just needs to require FactoryBot and the factories file to be able to use it.

I'm open to revising this, and I wanted to get thoughts before adding other factories.

ramontayag commented 5 years ago

@bartekn what are your thoughts on this?