cucumber/cucumber — Issue #176: basename() returns the wrong file name in Junit formatter
Author: strife25
Created: 2011-11-17 19:50:11+00:00
State: open

In the following method:

```ruby
def basename(feature_file)
File.basename(feature_file.gsub(/[\\\/]/, '-'), '.feature')
end
```

Getting the basename of the file fails because the file path delimeters get removed by `feature_file.gsub(/[\\\/]/, '-')` before File.basename executes.

For example, if I call ```cucmber /etc/some/path/to/test.feature -f junit -o /tmp/```, the output file that eventually gets created ends up being called **TEST-etc-some-path-to-test.xml**.