[Nitro] Nitro/Og spec jump-start

Mark Van De Vyver mvyver at gmail.com
Thu Sep 13 20:16:43 EDT 2007


In case anyone is interested..... update from Steve Ross (examples below):

Added two mutually exclusive parameters:
<quote>
-m - wrap each spec in a module
-u - use block form of "it"

Note that if you use either argument alone the spec works fine. If
you use them together, it errs out claiming there is no method 'new'
in module FileName. Let me know what you think of the tool as is, and
if you can shed any light on the problem with using -m and -u together.
</quote>

$ /tmp/rspec_todo.rb -m ./og/lib/og/adapter/oracle/override.rb
#------------------------------------------------------------
# File: /og/lib/og/adapter/oracle/override_spec.rb
#------------------------------------------------------------

require File.dirname(__FILE__) + '/../spec_helper'

module Override
  describe OCI8::Cursor, "as currently implemented" do
    it "should do something sensible with blank?."
    it "should do something sensible with fields."
    it "should do something sensible with each_row."
    it "should do something sensible with first_value."
  end

end


$ /tmp/rspec_todo.rb -u ./og/lib/og/adapter/oracle/override.rb
#------------------------------------------------------------
# File: /og/lib/og/adapter/oracle/override_spec.rb
#------------------------------------------------------------

require File.dirname(__FILE__) + '/../spec_helper'

describe OCI8::Cursor, "as currently implemented" do
  it "should do something sensible with blank?." do
    pending("for some reason")
    true.should eql(true)
  end
  it "should do something sensible with fields." do
    pending("for some reason")
    true.should eql(true)
  end
  it "should do something sensible with each_row." do
    pending("for some reason")
    true.should eql(true)
  end
  it "should do something sensible with first_value." do
    pending("for some reason")
    true.should eql(true)
  end
end


On 9/14/07, Mark Van De Vyver <mvyver at gmail.com> wrote:
> It's trivial, saves some keys strokes - I've used it more to give me a
> target to shoot at (it probably does not provide 100% coverage):
>
> /tmp/rspec_todo.rb ./og/lib/og/adapter/oracle/override.rb
> #------------------------------------------------------------
> # File: /og/lib/og/adapter/oracle/override_spec.rb
> #------------------------------------------------------------
>
> require File.dirname(__FILE__) + '/../spec_helper'
>
> describe OCI8::Cursor, "as currently implemented" do
>   it "should do something sensible with blank?."
>   it "should do something sensible with fields."
>   it "should do something sensible with each_row."
>   it "should do something sensible with first_value."
> end
>
> I've exchanged some emails with Steve he may(?) alter the format a
> little - RSpec now support pending(....)
>
> HTH?
>
> Mark
>
>
> On 9/13/07, George Moschovitis <george.moschovitis at gmail.com> wrote:
> > excuse my ignorance, but.. what is spec_todo.rb ?
> >
> > -g.
> >
> > On 9/12/07, Mark Van De Vyver <mvyver at gmail.com> wrote:
> > > Hi Devs,
> > > Steve Ross has kindly updated his spec_todo script to rspec_todo.rb -
> > > see below.  He asks to be informed of any Nitro/Og special cases.....
> > >
> > > Not pure BDDD, but saves a few keys strokes and gives a target to
> > > shoot at (and the only prepare script I'm aware of)
> > >
> > > FYI, 'not yet implemented' specs aren't parsed in the current
> > > test-helper scripts so you'll see red '0 failed' summary.
> > >
> > > Cheers
> > > Mark
> > >
> > > ---------- Forwarded message ----------
> > > From: s.ross <cwdinfo at gmail.com>
> > > Date: Sep 13, 2007 4:03 AM
> > > Subject: rspec_todo
> > > To: mvyver at gmail.com
> > >
> > >
> > > I made an svn project (haven't changed my blog post yet), but you can
> > > check this out at:
> > >
> > > http://svn.calicowebdev.com/rspec_todo/trunk
> > >
> > > Note that the name has changed from spec_todo.rb to rspec_todo.rb. I
> > > also incorporated your suggestion to omit the block for the "it". I
> > > will be changing "describe" to recognize controllers, but this won't
> > > help Nitro/Og. If there are any special cases for those, I'd love to
> > > hear about them.
> > >
> > > The code still has the old do/end for the "it" block, but commented
> > > out (I know, sloppy, sloppy).
> > >
> > > If you have other suggestions that might make this tool more useful,
> > > please let me know.
> > >
> > > Thanks for your interest.
> > >
> > > --s
> > >
> > > On Sep 11, 2007, at 11:31 PM, Mark Van De Vyver wrote:
> > >
> > > > Hi Steve,
> > > > On 9/12/07, s.ross <cwdinfo at gmail.com> wrote:
> > > > <snip>
> > > >> The script was created a while ago and rspec has changed a bit. If
> > > >> you find any problem, let me know.
> > > >
> > > > Seems to run 90% OK.
> > > > I pointed at the Postgresql adapter file in the Nitro/Og project:
> > > >  - seems to only parse one parameter.
> > > >
> > > > If you do revise, I think for the 'it' to be recognized as - Not Yet
> > > > Implemented - the do/end block is omitted.  There is a new pending()
> > > > method that is recognized.
> > > >
> > > > Anyway, looks great and is a fantastic jump start/target to shoot at.
> > > >
> > > > thanks
> > > > Mark
> > > >
> > > >
> > > >> --s
> > > >>
> > > >> On Sep 11, 2007, at 8:58 PM, mvyver at gmail.com wrote:
> > > >>
> > > >>> The following person signed the Calico Web Development contact form:
> > > >>>
> > > >>> Mark Van De Vyver
> > > >>>
> > > >>> The submitted information is:
> > > >>>
> > > >>> name:          Mark Van De Vyver
> > > >>> phone:
> > > >>> email:         mvyver at gmail.com
> > > >>> site_type:     other
> > > >>> timeframe:     just kicking tires
> > > >>>
> > > >>> comments:
> > > >>>
> > > >>> Hi,
> > > >>> Thnaks for the interesting blog pages!
> > > >>> I'm writing to request a copy of the spec_todo ruby helper script -
> > > >>> the file link on Steve's "Bootstrapping RSpec Generation" blog page
> > > >>> pointed to a page pointing here...
> > > >>>
> > > >>> Thanks in advance
> > > >>> Regards
> > > >>> Mark
> > > >>
> > > >>
> > > _______________________________________________
> > > Nitro-general mailing list
> > > Nitro-general at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/nitro-general
> > >
> >
> >
> > --
> > http://www.me.gr
> > http://phidz.com
> > http://blog.gmosx.com
> > http://cull.gr
> > http://www.joy.gr
> > http://nitroproject.org
> >
>


More information about the Nitro-general mailing list