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
m=mock_model(Transaction)m.to_s# Returns something like Transaction_#<RSpec::ExampleGroups::0x00564be9720728>
I would like to_s to also show what is stubbed inside that model, so that the spec is easier to read. For example:
m=mock_model(Transaction,type: :transfer)m.to_s# Transaction(type: :transfer) #<RSpec::ExampleGroups::0x00564be9720728>it{is_expected.tobe_able_to(:read,mock_model(Transaction,type: :transfer))}# Output: It should be able to read Transaction(type: :transfer) #<RSpec::ExampleGroups::0x00564be9720728>
It will look similar to what ActiveRecord does. What do you think?
The text was updated successfully, but these errors were encountered:
Current behaviour:
I would like
to_s
to also show what is stubbed inside that model, so that the spec is easier to read. For example:It will look similar to what ActiveRecord does. What do you think?
The text was updated successfully, but these errors were encountered: