Difficulty using Sequel mocking #2052
mattlindsey
started this conversation in
General
Replies: 2 comments 2 replies
-
I tried stubbing like this, but not working: allow_any_instance_of(Sequel::Mock::Database).to receive(:tables)
.and_return(rows) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Note that I haven't used rspec significantly in about 8 years, and never used the mocking features of rspec much, so I can probably only answer Sequel-specific questions. For rspec-specific questions, it would be best to ask on an rspec-specific forum. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Quick question, but let me know if you need more info.
My code saves the db in a class variable using
@db = Sequel.connect(connection_string)
, and when testing from rspec I am able create a mock and stub[]
using thisThat works, but when I try to stub
(:tables)
, I get this errorAm I maybe approaching this wrong?
Beta Was this translation helpful? Give feedback.
All reactions