-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding RSpec 3 and rails-api Gem Support #5
Conversation
Thanks Todd, it looks pretty good. I want to test it on some of our apps before I merge, probably get to that later in the week. |
No worries. If you think of something to do about the file stream thing, let me know. My solution was less than ideal. Let me know if you have any questions. Sent from my iPhone
|
Also passing example back into Middleware, but setting it up in the after hook in rspec.
@lserman Let me know if I missed anything. I believe I did everything you suggested. Thanks for catching the need for those checks. I was pretty heads down and only cared that it was working for my needs, so I apologize for not checking. |
I made a mistake, can you change to config.after(:each) do |ex|
_example = example || ex
# ...
Avocado::Middleware.invoke(_example, request, response) Due to the way Ruby parses local vars using |
Boy, my face is red. Okay: My previous commit of
was not right. I needed to burry the conditional in the braces instead. So I made that change (I just realized that I wasn't getting documentation generated). I also had to slightly modify the statement for setting Ensure this works for you (I've double and triple checked it on my end). |
Adding RSpec 3 and rails-api Gem Support
Made a couple changes to fix #6 - all files should now be replaced by text so I removed the hardcoded |
Notice one of my comments on a hack I had to do for file uploads (using
ActionDispatch::Http::UploadedFile
and rendering file objects when displaying the logs). Feel free to take any or all of it. If you come up with a more sophisticated way of displaying the file objects, please let me know.