A developer's journey through BrowserCms.

Friday, March 29, 2013

Running factories through rails console

This might be a good way to start understanding how objects are created in BrowserCms and how they connect with each other.

I extracted out the values from the cucumber configuration file (features/support/env.rb) and then I paste them into ./bin/rails c.  Keep  test/factories/factories.rb handy to generate database records using the supplied factories.
./bin/rails console
require File.expand_path('./test/support/factory_helpers')
require File.expand_path('./test/support/database_helpers')
require File.expand_path('./test/factories/factories')
require File.expand_path('./test/factories/attachable_factories')
require File.expand_path('./test/mock_file.rb')

include FactoryGirl::Syntax::Methods
include FactoryHelpers

No comments:

Post a Comment