On Fri, Nov 8, 2013 at 2:37 PM, Hadley Wickham <notifications@github.com>wrote:

> In R/test-files.r:
>
> > @@ -29,12 +33,13 @@ test_dir <- function(path, filter = NULL, reporter = "summary", env = NULL) {
> >      files <- files[grepl(filter, test_names)]
> >    }
> >
> > -  old <- setwd(path)
> > -  on.exit(setwd(old))
> > -  with_reporter(reporter, lapply(files, function(file) {
> > -    sys.source2(file, envir = new.env(parent = env))
> > -    end_context()
> > -  }))
> > +  .custom_test_file <- function(fname) {
> > +    lister$start_file(fname)
>
> There's also a default context - if none is provided it uses the name of
> the file. I wasn't sure if that was what you were trying to captre in the
> other functions.
>
 Is there a default context ? I can't find where it is set.
The ListReporter also records the name of the test file, even if often
redundant with the context.
Apart from this, the behavior in terms of context opening or closing should
be identical as before, otherwise it's a bug.