You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prevents the usage of verified doubles with rspec:
instance_double(ChargeBee::PortalSession,object: 'portal_session')# => error: the ChargeBee::PortalSession class does not implement the instance method: object
i hacked around this in my code with:
ChargeBee::Model.class_eval{attr_reader:object}
but i don't know if this is correct and whether all models include the "object" information.
ideally, each model that has the "object" information would have an attr_reader/accessor for it (or it could be added to Model if its all of them).
The text was updated successfully, but these errors were encountered:
Many (all?) Chargebee models respond to the "object" method. E.g.
however, they say that they don't:
presumably this is because the return value is fetched via
method_missing
here.this is not ideal for code with type checks.
also
respond_to_missing?
has not been implemented, though there is a PR for it.similarly, this:
prevents the usage of verified doubles with rspec:
i hacked around this in my code with:
but i don't know if this is correct and whether all models include the "object" information.
ideally, each model that has the "object" information would have an attr_reader/accessor for it (or it could be added to Model if its all of them).
The text was updated successfully, but these errors were encountered: