Refactor helper methods
Refactor helper methods

Refactor helper methods

* Use `.tap` to append file attribute
* Use `first` instead of `[0]` and `&&` instead of `and`

cucumber/cucumber-ruby,cucumber/cucumber-ruby,cucumber/cucumber-ruby