Giter Club home page Giter Club logo

Comments (11)

dchelimsky avatar dchelimsky commented on June 14, 2024

Chad and Kabari are working on this (rspec hackfest FTW).

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Nobody is working on this now, so if anybody else wants to, just add a comment here that you're doing so.

from rspec-core.

justinko avatar justinko commented on June 14, 2024

I got this one.

from rspec-core.

justinko avatar justinko commented on June 14, 2024

David, I sent you a pull request before realizing you'd rather have "pull requests" pasted here. I'll do that from now on.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

justinko's patch: http://github.com/justinko/rspec-core/commit/291d316

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Hey Justin - I applied your patch and got a syntax error

lib/rspec/core/command_line_configuration.rb:51: syntax error, unexpected $end, expecting kEND (SyntaxError)

After addressing that, all the specs and cukes passed, but when I tried it on the command line with a pre-existing autotest/discover.rb, I got this:

/Users/dchelimsky/projects/ruby/rspec2/repos/rspec-core/lib/rspec/core/command_line_configuration.rb:29:in `create_discover_file': undefined local variable or method `optionally_remove_discover_file' for RSpec::Core::CommandLineConfiguration::Autotest:Class (NameError)

Wanna take another shot?

from rspec-core.

justinko avatar justinko commented on June 14, 2024

Fixed: http://github.com/justinko/rspec-core/commit/81d2be8

Question. Since aruba cannot cover the "gets" method, should I test it with RSpec doing something like this?: http://technicalpickles.com/posts/a-pattern-for-using-standard-in-and-out-in-your-ruby-code/

Thanks David.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

@justinko - No need to modify the design like that. This isn't java :) You can stub gets right on the object:

interactor = Interactor.new
interactor.stub(:gets).and_return("this")
interactor.method_that_adds_and_that_to_gets.should eq("this and that")

I generally try avoid stubbing methods on the subject of an example, but I'd probably go for the tradeoff here.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

I applied your patch (from 2 comments back) and got the same syntax error, and then got this after fixing it and trying to run:

lib/rspec/core/backward_compatibility.rb:20:in `const_missing': uninitialized constant RSpec::Core::Parser::CommandLineConfiguration (NameError)

from rspec-core.

justinko avatar justinko commented on June 14, 2024

I'm getting no errors with HEAD. I created another clean branch, try using this one:

http://github.com/justinko/rspec-core/commit/ff5770e

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Works. Merged: http://github.com/rspec/rspec-core/commit/f72032432b8fcef5cfa810cb020d8bd2f816a272

Thx!

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.