Re: offtopic: best way of plainng overall structure of programs/functions etc.
Re: offtopic: best way of plainng overall structure of programs/functions etc.
- Subject: Re: offtopic: best way of plainng overall structure of programs/functions etc.
- From: "Eloy Duran" <email@hidden>
- Date: Sun, 5 Aug 2007 17:00:54 +0200
Hey Stephan,
I like to create my classes the BDD route
http://en.wikipedia.org/wiki/Behavior_driven_development.
This way you can write some specs that you want to have implemented
and allows you to focus on that part you're working on without the
overhead of the whole application.
And as a bonus you will have a set of good working examples (tests) of
all the behaviour in your class plus self explanatory documentation.
I do this with RSpec, which (also because of Ruby) allows you to write
very expressive examples (tests). From the RSpec website:
describe Account, " when first created" do
before do
@account = Account.new
end
it "should have a balance of $0" do
@account.balance.should eql(Money.new(0, :dollars))
end
after do
@account = nil
end
end
I myself work with RubyCocoa, but I don't think there should be any
problem with using RSpec for your own Objective-C classes... If you
are interested in trying this out, I (and probably others on the
RubyCocoa lists) are more than willing to help you out to get it
running.
Cheers,
Eloy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden