Skip to content
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

Promise Based Async Support #21

Closed
wants to merge 126 commits into from
Closed

Promise Based Async Support #21

wants to merge 126 commits into from

Conversation

wied03
Copy link
Contributor

@wied03 wied03 commented Jun 3, 2015

Builds on the Opal 0.8/RSpec 3.1 branch/pull request.

I've updated the README and Changelog to show usage but here is what has changed on a more detailed level:

  • Added a basic Rake task that wraps the opal:spec test and ensures that we fail when we're supposed to and checks to make sure the right tests failed. This is kind of rudimentary I know, but before this, there was no way to verify that opal-rspec was failing when it should
  • Async support
    • Example group hierarchy
    • Pending/skipped within the example
    • Before/after each
    • Around example
    • Test failures show up properly in results instead of uncaught exceptions
  • Added/organized lots of other specs to try and prevent regression as the async changes were made

@wied03
Copy link
Contributor Author

wied03 commented Jun 3, 2015

@elia - will be happy to squash if you like what you see here. I can also redo the PR if/when the 3.1/0.8 PR is merged in so that it's easier to see just the async changes.

@elia
Copy link
Member

elia commented Jun 3, 2015

Let's do it this way: squash the commits on #19 and I'll push it as a new rspec31 branch (or something similar) the this PR can target that branch instead of master and the real diff becomes intelligible. Sounds good?

wied03 added 27 commits June 3, 2015 18:15
Browser formatter is the more detailed oriented (as compared to text/rake), so go ahead and include stack traces to ease debugging
* Run_examples hack on example group seems to work now
…summary results reflect failures properly

* Clean up puts statements
…irst one for the results, and test for it using the old "should make example fail before async block reached" test
…example should be considered complete

* Use that to make skip within an example work
Get descendant example groups working with promises (and share code)
wied03 added 20 commits June 3, 2015 19:23
…match that)

* Run_after_example had code that ran after the hooks, so needed to wrap that in promises
… specs with async before(:each) +after(:each) now work
…ks, and after better promise understanding, do a more literal conversion of begins/rescues/ensures to promises
* Got something that works as long as the around block does not fail, need to figure out how to fix that
…tly rather than evaluating it in the group in commit b0a4659, all of these specs can be streamlined
@wied03
Copy link
Contributor Author

wied03 commented Jun 4, 2015

@elia - done

@ryanstout
Copy link

Any updates on this? I could use this merged if it looks good. Nice work @wied03

@elia
Copy link
Member

elia commented Jul 24, 2015

It's next on my list (the whole repo) but needing more than 5min of attention I keep delaying it. 😕

@ryanstout
Copy link

@elia cool, no rush. Keep up the good work.

@elia elia closed this in #25 Jul 28, 2015
@wied03 wied03 deleted the opal-0.8-other/rspec31_async_subject branch July 29, 2015 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants