Sequel 5 and Model mocking

2018-04-17 Thread david
Hi everybody. In my project there is some framework code enhancing Sequel classes for our preferred use. That code needs some tests that mock database access. Sequel provides mocking capabilities, but all "documentation" I get seems to be adapted to pre-5 Sequel, because when using it (I talk

Equivalent to :methods option from ActiveModel::Serializers::JSON

2018-04-17 Thread Marcelo Pereira
Hello, I'm using the JsonSerializer Plugin in Sequel, but I need to add, to the serialized model, a property that comes from a method call (as opposed to from a database column). Is there a way to do this using this plugin, or should I try to create my own plugin for this? Best -- You

Re: Equivalent to :methods option from ActiveModel::Serializers::JSON

2018-04-17 Thread Marcelo Pereira
I checked the code, and saw that :include doesn't work, but :only does. Thanks a lot for answering this quickly. On Tuesday, April 17, 2018 at 7:26:40 PM UTC+2, Jeremy Evans wrote: > > I think you can use the :include option for this, though I'm not sure what > the :methods option does in AMS.

Sequel 5 and Model mocking

2018-04-17 Thread Jeremy Evans
For fully mocked tests, Sequel ships with a mock adapter you can use. -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to sequel-talk+unsubscr...@googlegroups.com.

Equivalent to :methods option from ActiveModel::Serializers::JSON

2018-04-17 Thread Jeremy Evans
I think you can use the :include option for this, though I'm not sure what the :methods option does in AMS. -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Sequel 5 and Model mocking

2018-04-17 Thread Jeremy Evans
On Tuesday, April 17, 2018 at 2:16:36 PM UTC-7, da...@abstra.cc wrote: > > El martes, 17 de abril de 2018, 19:28:01 (UTC+2), Jeremy Evans escribió: >> >> For fully mocked tests, Sequel ships with a mock adapter you can use. > > > Great! Where can I find good example documentation? > I think the

Re: Sequel 5 and Model mocking

2018-04-17 Thread david
El martes, 17 de abril de 2018, 19:28:01 (UTC+2), Jeremy Evans escribió: > > For fully mocked tests, Sequel ships with a mock adapter you can use. Great! Where can I find good example documentation? -- David -- You received this message because you are subscribed to the Google Groups