mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
29b144651b
Currently it says something like this: Expected Person#name to delegate to Person#company as #company_name However, this isn't in line with proper terminology. It doesn't make sense to say that one method delegates to another; you delegate a method to another object. So now it says: Expected Person to delegate #name to #company object as #company_name Additionally, we now clarify that #company (in this example) -- or rather the object returned by #company -- is the delegate object, and if this object never receives any method calls we say so. Instead of this: Calls on Person#company: ... we say: Method calls sent to Person#company: ... Furthermore, the description (which is shown as the tests are run) was not correct when `delegate_method` was used against a class rather than an instance. As an example, the following code: it { expect(Person).to delegate_method(:name).to(:company) } would print out as should delegate #name to #company object and now it prints out as should delegate .name to .company object |
||
---|---|---|
.. | ||
shoulda/matchers | ||
support | ||
warnings_spy | ||
report_warnings.rb | ||
spec_helper.rb | ||
warnings_spy.rb |