Hi, I am trying to mock some data for unit testing.
DB = Sequel.mock(:fetch=>[{:id => 1, :name => 'name'}])
Sequel::Model.db = DB
This is find and I can get the mocked data.
fetchedData = DB[:fetch].where(:name => 'name')
However, I also have a model:
class FetchSomething < Sequel::Model(:fetch)
I can't retrieve the mocked data then:
fetchedData = :FetchSomething[:name => 'name']
Could someone please point out what I had done wrong or what am I missing?
Thanks.
--
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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.