-
Notifications
You must be signed in to change notification settings - Fork 15
RSpec 3.1/Opal 0.8 Changes #19
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
Conversation
And by working, I mean that I can pass the specs (added 1 more) and I don't get any deprecation warnings or uncaught errors in the Javascript console |
Any reason for not targeting rspec 3.2? |
@elia - No good reason. It's just the version I was using on a Ruby project. I could do the upgrade work to 3.2 for this PR. I wanted to get feedback before I went too far with this. The Rake task I setup to derive the requires file (rather than the old way of having to arrange it just right) hopefully will make it easier to stay current. |
Don't bother, I checked out the branch and working on some cleanup in the util files, so I'll this branch along with those changes. I'll close the other PR as I see it's included in this one. |
Ok. In case its not obvious, the Rake task was designed to basically make
|
Browser formatter is the more detailed oriented (as compared to text/rake), so go ahead and include stack traces to ease debugging
I took a look at RSpec 3.2 just to get an idea. Seems like the easiest way to get over the rubyfeatures/eval problem was to add an 'ignore' capability to the create_requires.rb script I worked on and then put a pre_require version of that in. The harder problem I ran into was super() crashing in RSpec::Configuration |
@elia I also did some work with formatters. Check out https://github.com/wied03/opal-rspec-formatter I think it probably makes sense to keep this as a separate GEM. I monkey patch Opal::RSpec::RakeTask so that it has "2 mains", one to set the formatter and then whatever the Rake task (default opal-rspec, user, opal-rails) has specified. It's a little goofy, but I didn't want to have to do something special for opal-rails, etc. to work. Thoughts? Most of this was getting 'builder' to work, which I eventually did (that's another github repo - https://github.com/wied03/opal-builder). JUnit was the logical choice because most CI systems can read the results from that. |
Thanks! Too bad I'm struggling to find the time to review and merge properly these PRs :) |
@wied03 Hey, just saw these two pull requests (been away for a while, but getting back into opal work now!). What's the status with these? The rspec work was always tricky, so I'm glad you were able to make progress with them |
@adambeynon , I think @elia was going to create an RSpec 3.1 branch and merge this PR into that. Then there would be a 'cleaner' baseline to evaluate the async PR and work on RSpec 3.2+ |
@adambeynon I started refactoring the files in the Also I think it's notable that the RSpec guys were willing to have an opal-based online demo of RSpec once we updated to the latest release |
@elia, @wied03 Ah awesome. Yeah, any code would be great. I don't mind putting the shift in to get it all working. @elia I do recall that - would be quite nifty to have that. Worth the push to get the newest stuff working straight on opal. They might be willing to help out with some of our monkey patching (mutable string fixes etc). |
@adambeynon yes, they seemed happy to help with mutable string stuff and compat in general, will push in a moment |
@elia @adambeynon - Anything I can do to help move this along? |
Shouldn't be merged into master just yet (maybe a new branch), but I managed to get RSpec 3.1 working with Opal 0.8 (master branch right now).
In order to get around the RSpec dynamic require problem, I created a Rake task to try and ease the process of creating the opal/opal/rspec/requires.rb file. Check it out and see what you think.