On Wednesday, September 2, 2015 at 10:32:31 AM UTC-7, Nicholas Variz wrote:
>
> Hello,
>
> I have a Sequel model whose only purpose is to read from a remote table 
> with certain filter conditions.
> I would like to write a spec to verify that the filter conditions work as 
> expected.
> I have been looking at the Sequel::Mock API docs and found stubbing the 
> dataset via _fetch worked great and was very easy to do.
>
> However since I would like to test this particular subset query I have on 
> my Sequel model, I cannot use _fetch to stub the dataset b/c 
> that will trump my query filtering.
> Looking through the docs I haven't been able to find a way to mock 
> MyModel.db in such a way that I can subsequently execute inserts
> and such to test the filter conditions.
>
> Is such a use-case supported by the current mocking API?
>

Maybe.  It's hard to say for sure, as I don't completely understand what 
you want to do.  Could you post some example code showing what you want to 
do?

Thanks,
Jeremy 

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to