The Item initializer is calling .check_for_path (https://github.com/sul-dlss/assembly/blob/master/lib/item.rb#L25-L27) which in turn calls .path_to_object which then caches the value before we had a chance to reset the value of root_dir in the tests. We need to clear this cached value after the initializer runs in the tests so we can use our modified root_dir.
Coverage remained the same at 94.944% when pulling ba8abbca2c098026507e6f39c9c6ea3a26d9d2e1 on no-cache-path-to-object into 180bd3c781d4d738c3a364aa656434202077aec8 on master.
Not necessary after #126 ??
The
Item
initializer is calling.check_for_path
(https://github.com/sul-dlss/assembly/blob/master/lib/item.rb#L25-L27) which in turn calls.path_to_object
which then caches the value before we had a chance to reset the value ofroot_dir
in the tests. We need to clear this cached value after the initializer runs in the tests so we can use our modified root_dir.