John Wu wrote in post #961900:
Marnen Laibow-Koser wrote in post #961899:
John Wu wrote in post #961894:
At the moment, using the name to check the file is enough.
OK. Then you presumably already know how to do that.
In fact, that's the main question because I have no idea how to do that.
You'll probably want to download the file to a temporary directory
(Tmpdir will come in handy here), which you know is blank at the
beginning of the test, then check the contents of the directory after
the test. There may be other approaches.
Capybara may have a canned way of doing this. Check the docs.
By the way,
do you know anyway to check if a sent mail have an attachment using
Cucumber? Thanks again
You're asking the wrong questions, I think. The question is not "how to
test for ... using Cucumber?"; the question is "how to test for ...?".
Remember, there's nothing magical about Cucumber steps; they can call
any Ruby code you like.
Sorry, my bad again.
Oh, it's not "your bad"; I'm just trying to remind you that you probably
know a lot of these answers already.