[rspec-users] [rspec-devel] Rspec Brown Bag

Brian Takita brian.takita at gmail.com
Tue Nov 21 01:39:17 EST 2006


On 11/20/06, Brandon Keepers <bkeepers at gmail.com> wrote:
>
> One of the things that has sold me on rspec--besides the fact that it
> encourages better tests--is the ability to print out the specs from
> your app.  For example, the following are the start of some specs for
> an ecommerce app I am working on.  I can take my tests (specs derived
> from user stories) and generate documentation that I can hand
> directly to the customer, and it makes perfect sense to them.  There
> is no question as to what the app does and whether or not the specs
> are up to date.  That alone is worth it's weight in gold.


Agreed. This is a sweet feature.

A user
> - can purchase items
> - should have many orders
>
> A user purchasing items
> - should create an order
> - should add to the user's orders
> - should create line items
> - should set line item amount to the item's price
> - should set line item amount to 0 if item does not have a price
>
> An order
> - should have line_items
> - should have an invoice
> - should be invalid without an amount
>
> An invoice
> - should have many orders
> - should be invalid without an amount
> - should have many payments
> - should belong to a user
>
> Paying an invoice
> - should create a payment
> - should set payment amount equal to invoice amount
> - should set payment confirmation number
>
> Calling invoice.pay with an invalid credit card
> - should raise AuthorizationError
>
> A payment
> - should belong to an invoice
> - should be invalid without an amount
>
> Brandon
>
> On Nov 20, 2006, at 9:07 PM, Brian Takita wrote:
>
> > Hello,
> >
> > I'm scheduled to give a rspec brown bag this Wednesday (11/22) for
> > my company (Pivotal Computer Systems, http://www.pivotalsf.com). I
> > did see Dave Astel's talk as well as several of my coworkers.
> > The developers at my workplace are experienced Agile developers.
> >
> > What would be some good things to focus on for this brown bag?
> > Are there slides to presentations that would be useful?
> > Any resistance/skepticism, and how to best address these concerns?
> >
> > I'm kindof nervous because there is some skepticism toward rspec
> > and BDD.
> >
> > Mainly:
> > Test::Unit already does that, so why do we need rspec?
> > It's not production ready. (Stack traces are too cluttered for
> > RspecOnRails; although this opinion was based on version 0.6)
> > New people will be confused seeing rspec code (although this is
> > solved by more education, usage, encapsulation, etc.)
> > BDD is TDD using "should" instead of "assert"
> > There are also a number of people who do see benefits to using
> > rspec and are excited by it, so I do have "allies". :)
> >
> > I'm particularly interested in showing:
> > How BDD is really good TDD without sounding religious
> > How rspec encourages developers to create better "tests" than
> > Test::Unit
> > Thank you,
> > Brian Takita
> > _______________________________________________
> > rspec-devel mailing list
> > rspec-devel at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-devel
>
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061120/52ec1174/attachment.html 


More information about the rspec-users mailing list