I realized there are problems with that "after" code by the way - it was
kind of back-of-the-envelope but hopefully gets the point across. It just
changes the error message to list any existing files in the given directory.

On Tue, Sep 11, 2018 at 10:13 AM Dana Scheider <dana.schei...@gmail.com>
wrote:

> Sure, it wouldn't change the API at all. It'd just change this:
>
> assert File.exist?(absolute), "Expected file #{relative.inspect} to exist,
> but does not"
>
> To something more like this:
>
> files = Dir[absolute]
> assert File.exist?(absolute),
>   "Expected file #{relative.inspect} to exist, but does not. Existing
> files in this location are: #{files}"
>
> Only the error message would really change.
>
> On Tue, Sep 11, 2018 at 6:04 AM Xavier Noria <f...@hashref.com> wrote:
>
>> Can you write some concrete examples? How would the calls look like?
>> Which would be the assertion logic and error messages?
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ruby on Rails: Core" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/rubyonrails-core/97lc7dB9OOg/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> rubyonrails-core+unsubscr...@googlegroups.com.
>> To post to this group, send email to rubyonrails-core@googlegroups.com.
>> Visit this group at https://groups.google.com/group/rubyonrails-core.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to