Code Monkey home page Code Monkey logo

Comments (7)

ashmoran avatar ashmoran commented on August 22, 2024

BTW my branch is in an intermediate state, as I was trying to port Spork's features to use Aruba. Next step is to try Aslak's forking_children Aruba branch.

from spork.

timcharper avatar timcharper commented on August 22, 2024

Great on porting the features to Aruba! But as for the debugger features, I think the two-way communication is needed. I think we'll need Popen3 at the very least.

I think it would be best to implement Spork::TestFramework::RSpec2 inside of RSpec. I'm surprised that you're finding that Spork does the framework detection before checking loading TestFramework subclasses from other gems. We'll have to check into that.

As for being limited to helper file detection only... one can just override self.available? to change this behavior.

from spork.

timcharper avatar timcharper commented on August 22, 2024

Getting closer on Rspec 2.0 on my side. I've got a rails 3 branch in the works, and am working towards getting it working.

from spork.

ashmoran avatar ashmoran commented on August 22, 2024

Cool! I don't have time to work on it unfortunately but let me know if you have any questions.

from spork.

timcharper avatar timcharper commented on August 22, 2024

fair enough, it's taken me forever to get motivated enough to work on it. I knew it was going to sink a score of hours.

In my rails3 branch, I'm getting an issue that seems to be on the rspec side. Here's the output:

expected "Exception encountered: #<NoMethodError: undefined method `configure' for [\"spec/did_it_work_spec.rb\"]:Array>
backtrace:
/Users/timcharper/.rvm/gems/ruby-1.8.7-p249/gems/rspec-core-2.0.0.beta.16/lib/rspec/core/command_line.rb:11:in `run'
/Users/timcharper/.rvm/gems/ruby-1.8.7-p249/gems/rspec-core-2.0.0.beta.16/lib/rspec/monkey/spork/test_framework/rspec.rb:4:in `run_tests'
/Users/timcharper/projects/spork/lib/spork/run_strategy/forking.rb:13:in `run'
/Users/timcharper/projects/spork/lib/spork/forker.rb:21:in `initialize'
/Users/timcharper/projects/spork/lib/spork/forker.rb:18:in `fork'
/Users/timcharper/projects/spork/lib/spork/forker.rb:18:in `initialize'
/Users/timcharper/projects/spork/lib/spork/run_strategy/forking.rb:9:in `new'
/Users/timcharper/projects/spork/lib/spork/run_strategy/forking.rb:9:in `run'
/Users/timcharper/projects/spork/lib/spork/server.rb:47:in `run'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1558:in `__send__'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1558:in `perform_without_block'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1518:in `perform'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1592:in `main_loop'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1588:in `loop'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1588:in `main_loop'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1584:in `start'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1584:in `main_loop'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1433:in `run'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1430:in `start'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1430:in `run'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1350:in `initialize'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1630:in `new'
/Users/timcharper/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/drb/drb.rb:1630:in `start_service'
/Users/timcharper/projects/spork/lib/spork/server.rb:29:in `listen'
/Users/timcharper/projects/spork/lib/spork/server.rb:20:in `run'
/Users/timcharper/projects/spork/bin/../lib/spork/runner.rb:76:in `run'
/Users/timcharper/projects/spork/bin/../lib/spork/runner.rb:10:in `run'
/Users/timcharper/projects/spork/bin/spork:10
" to include "Specs successfully run within spork, and all initialization files were loaded" (Spec::Expectations::ExpectationNotMetError)
 ./features/steps/sandbox_steps.rb:94:in `/^the (error output|output) should contain "(.+)"$/'
 features/rspec_rails_integration.feature:65:in `And the output should contain "Specs successfully run within spork, and all initialization files were loaded"'

It can be reproduced by checkout out my rails3 branch and running:

bundle install
bin/cucumber features/rspec_rails_integration.feature:35

That will show the error and generate the project. One can cd tmp/sandbox/temp_rails_project and play with it further.

Any idea what's going on? Looks like here we initialize the CommandLine object with the provided arguments:

http://github.com/rspec/rspec-core/blob/v2.0.0.beta.16/lib/rspec/monkey/spork/test_framework/rspec.rb#L4

But then, that's eventually becomes "@options", which later has .configure requested from it.

http://github.com/rspec/rspec-core/blob/v2.0.0.beta.16/lib/rspec/core/command_line.rb#L5-11

from spork.

ashmoran avatar ashmoran commented on August 22, 2024

I had a conversation with David about the interface, he decided to change it so it passed an object of some sort, not just the args. Apparently this broke:

http://github.com/rspec/rspec-core/issues/closed#issue/61

However I haven't seen the new code so you might get a better answer from David - he might know what's going on off the top of his head. Sorry I can't be more help.

from spork.

timcharper avatar timcharper commented on August 22, 2024

it's done. Thanks!

from spork.

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.