1 is easy since it is just a command changing a file. Whether it is the editor or sed
or something else doesn't matter. You could unit test the object calling the command to make sure it runs $EDITOR path/to/file
but that's not something your acceptance test should care about. 2 is easy too, since Cucucmber doesn't have to know the command that got run. That's a unit test thing. Cucumber should only observe the outside effect (some file was created, some output is shown on the screen, etc).
Let Cucumber observe what happens as seen by the user. Let your unit tests check how that happens.