On Mon, Sep 21, 2009 at 5:48 PM, Calvin <cstephe...@gmail.com> wrote: > > I am pretty new to RSpec and I wonder if some code I have written is > leading me in the right direction. Any advice is greatly appreciated!
As a beginner exercise, this code looks perfectly functional to me. But I believe you left out the interesting parts: * Which did you write first? The spec or the implementation? * Is the behavior description, "it should perform calculations," clear and precise? If I didn't have access to the code, would I be able to read that description and know something useful about the class's behavior? * Why did you choose the method name "equation"? If I simply knew that name, would I be able to tell what that method does? * What is it you _really_ want this class to do? Does the specification help you verify that it acts according to your intention? * Why do you want it to do that? (Okay, granted, this may be more of a Cucumber question than an RSpec question.) >8-> -- Have Fun, Steve Eley (sfe...@gmail.com) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users