I
I
IvanN7772016-12-07 22:29:44
ruby
IvanN777, 2016-12-07 22:29:44

Testing a gem that uses a db?

I can make gem via
rails plugin new --mountable
Or
bundle gem
I was told gem to test, but gem should save data to database.
So I understand that the only way to keep this gem is to generate migrations.
Then, the actions can use this data that the migrations have generated.
But how then to test the application, if the data will be installed with us only after being included in the application.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2016-12-13
@2ord

You can test both on synthetic data created on the fly, and on data taken from real sources and saved in yml/csv files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question