Giter Club home page Giter Club logo

Comments (21)

ashmoran avatar ashmoran commented on June 14, 2024

I'm working on this

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

This will require a change and some extensions to Spork: http://github.com/timcharper/spork/issues/issue/27

The relevant issue to RSpec is what interface to expose for Spork. I've done a bit of refactoring to RSpec (unpushed) to separate DRb execution from in-process execution, but it's definitely not yet in a good state.

This is a little harder than I expected due to RSpec API changes. I was hoping to avoid forking Spork, but I can't see an elegant way to integrate the two otherwise, due to the way Spork loads its TestFramework adapters.

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

I'm making good progress on this. The code in my branch is still a bit of a mess as I find my way around, but functionality is moving forwards (the existing specs and features still pass). Hopefully tomorrow I'll have RSpec in a good enough state I can start making the patches to Spork. How much I'll oscillate between the two to integrate them, however, is anyone's guess. I only have tomorrow morning to work on this really, and a busy weekend, so there's a chance it won't be done until Monday.

The only major interface change I can think of so far is Rspec::Core::Runner#run now takes the output and error streams.

The biggest obstacle I've come up against is the use of singleton Configuration and World objects. Because the DRb specs run examples inside themselves (in the same process), this demands a bit of instance variable surgery to prevent interference. I can see the appeal of the class methods for the configuration, but I suspect they will need decoupling from the Runner instances somehow.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

What if those methods accepted an optional scope argument?

Rspec.configure :scope => :drb do; end
Rspec.configuration :scope => :drb

Would that help?

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

Yes I think that would work! It would have to be possible to overwrite/reset a configuration in a scope. Then the code would either have to select the configuration before creating the runner, or pass the scope into it for the Runner to look it up (easier, can't say if it'd be better or not).

from rspec-core.

rsanheim avatar rsanheim commented on June 14, 2024

Commenting so I get updates on this -- spork for Rails 3 would be great.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Hey Ashley, Rob, et al - been focusing what little spare time I have to getting the rspec-rails dev environment to work better so others can contribute. That's in a good spot, so I'll plan on focusing on spork integration this week.

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

Thanks David - I've been consumed by client work (what I'm doing right now in fact) - and it's been playing on my mind that this has been sitting as WIP for so long. I think by and large all the pieces are there, but it needs serious refactoring on both sides!

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

I won't have time to look at this until later today at the earliest - are all of the pieces in github repos that I can see?

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

Yep, in feature branches in my branches of rspec-core and spork. I've updated the Spork ticket with a note too just FYI (in case you aren't watching that ticket): http://github.com/rspec/rspec-core/issues/issue/2

Relevant branches:

http://github.com/ashleymoran/rspec-core/tree/issue_2_drb_support
http://github.com/ashleymoran/spork/tree/issue_27_rspec2_support

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Great. Thanks. I'll follow up soon (in a day or so).

from rspec-core.

rrouse avatar rrouse commented on June 14, 2024

Any update on this?

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

I haven't done anything more on it recently. Unfortunately, I've been fully booked by a client on a Rails 2.3 project, which is taking up all my coding time. I'll happily resume when that quiets down, but there's no indication that will be soon.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

This will be resolved before rails-3 goes final. Hopefully sooner, but this is clearly a must have.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

OK - this is my main priority right now. Ashley, I merged your changes to a branch (http://github.com/rspec/rspec-core/tree/issue_2_drb_support), but a LOT has changed in rspec-core since you wrote them, so things are a bit of a mess right now (specs run, but lots of failures and odd output). Ping me in #rspec on freenode if you have a chance. Until then, I'll keep plugging at this.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Fixed!!!!! Merged!!!!!! Thanks @ashleymoran:

http://github.com/rspec/rspec-core/commit/f99c34ea2fa02ae2d6e02cc68505a3f5114f30f6

I've made a number of changes since to get things to work, and I'm still refactoring a bit more, but I got it to a point where it seemed like a good idea to merge to master. Release coming soon.

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

Lol, no worries, I think you did the hard work making it work after I let my code had rust for who knows how long! I may at some point come back to refactor the ugly bits I cobbled together...

from rspec-core.

ashmoran avatar ashmoran commented on June 14, 2024

Just glad to know when I get back to Rails 3 I'll have Spork to play with :-)

from rspec-core.

rsanheim avatar rsanheim commented on June 14, 2024

Hey should this be closed now, or is it still in progress?

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Closed - are you experiencing any trouble?

from rspec-core.

rsanheim avatar rsanheim commented on June 14, 2024

No, haven't tried it yet. I just have problems understanding what current status is from github issues sometimes. :)

from rspec-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.