Here's a scenario:
foreman run ruby -Itest test/unit/a_test.rb
foreman run is actually a Thor task. The syntax used above doesn't pass -Itest to Ruby, but parses it as -I, -t, -e, -s -t (https://github.com/wycats/thor/blob/master/lib/thor/parser/options.rb#L63).
-I, -t, -e, -s -t
-e is a valid Foreman option (alias for --env), so it sets options[:env] = "env", which causes an error, because Foreman tries then to look for a file with such name.
options[:env] = "env"
Is there a different way to pass ruby -Itest test/unit/a_test.rb option to actually make it work?
ruby -Itest test/unit/a_test.rb