Displaying 20 results from an estimated 20000 matches similar to: "Is test driven development for newbies?"
2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce''
which is very heavy on Test Driven Development. As in, you have to
write tests for scaffolding methods and validations and crap like that.
And then they fail. And you KNOW its the test not the method. So you
spend 2x the time writing a test that has to be adapted when
requirements change. You
2009 Jan 31
1
Test Driven Development in R
Hi,
I wonder what kind of interest there is on Test Driven Development (TDD) in R.
Test Driven Development consists of writing the test before the function, and
iteratively build the function until it passes the test.
Python and Ruby (specially Ruby) have very strong test-oriented cultures. In
fact, in Ruby at least the custom is to do TDD and lately Behavior-driven
development (BDD). In BDD,
2007 Sep 16
12
rspec_todo -- spec''ing backwards
While the spirit of BDD is to spec first and code second, many of us
have legacy code. Worse, some of us have legacy code without very
good coverage. Recognizing that *I* have such code, I created a
script that grinds through your .rb files and creates placeholder
specs for each public method.
While it is more sensible to spec behavior of code function than of
individual methods, this
2006 Apr 16
1
How to use ZenTest?
OK, supposedly it has Rdoc documentation but I couldn''t find it (not helped
by the fact that I''ve never used offline rdocs so I don''t really know where
to look).
So, does anybody know how to use ZenTest effectively with Rails? I read all
I could find on the web but nothing really illuminated for me. I''m trying to
get into Test Driven Development (I have already
2006 Sep 19
18
Open Source UML Tool for Ruby on Rails?
I am new to web development, Ruby on Rails, and UML as well. I was
wondering if there were any free tools available for UML design.
There is a list of free tools on wikipedia under UML tools, but I don''t
understand if I need a tool that supports the ruby language. If anyone
uses a free UML tool for designing Ruby on Rails apps, please let me
know what you use.
2008 Nov 21
57
Spec''ing via features
As I work with Rails TestUnit tests I am reconsidering how to use
cucumber features. It seems to me that it might be best to have a
coherent view of how to arrange my test suites before I get much further
into this. Now, so far I have considered three possibilities:
1. Use features exclusively. Create a feature file for each model, one
for each controller and possibly an additional one for
2006 Nov 07
7
should_redirect_to in advance - feels unnatural
I can understand that it''s easier for rspec to set up a mock in advance
of the controller call. But it makes it difficult to do something like:
context "The HarkController, given Louie the logged-in user" do
setup do
post :login, :username => ''louie'', :password => ''atest''
end
specify "should redirect Louie to the home
2007 Aug 08
3
rspec with autotest on a windows machine
Hello all,
I''m new to rSpec but after reading a couple of tutorials I''ve become
enamored. Anyway, I am at minute 42 of the rSpec basics screencast (
peepcode.com) and I''m having the following error running autotest w/rSpec:
D:\ruby\projects\forecaster>autotest
loading autotest/rails_rspec
c:\ruby\bin\ruby -rrubygems -e "require ''redgreen''"
2007 Jun 08
20
When to use BDD/TDD w/ external libraries
Test First Development is great...But should you use it when you are
adding classes/methods on to external library that doesn''t have an
extensive test suite? I noticed that the rspec plugin for autotest
has no specs.
David Chemlinsky said something to the list a while back that has
been stewing in my subconscious - that you develop software
differently using Test First
2006 Nov 21
10
Rspec Brown Bag
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
2007 Mar 24
15
State Based vs. Behaviour Based Spec/Testing
I''ve notice that a project like Rubinius has both a spec & a test
directory. Rspec has only a spec directory. Obviously I support
BDD, but isn''t there also a place for state based/verification
testing? I sometimes sense that I *do* want to practice Test Driven
Development. That is, I want some assurance that my production code
will run as intended. But I also
2008 Jan 27
8
Textmate RSpec Bundle ''it'' snippet
It seems to me that the RSpec bundle''s ''it'' snippet is in need of some
love. By default, a newly inserted spec passes. This seems odd as it
is misleading. It also makes it harder find what specs still need to
be completed if you return to an RSpec module after a break.
I propose that the ''it'' snippet is changed to the following:
it
2007 Sep 12
12
Philosophical questions
Disclaimer: The following are observations by a relatively new user
(couple of weeks) of RSpec and not intended as RSpec trollbait.
Also, forgive me if similar topics have been discussed elsewhere on
the mailing list. I at least did the due diligence of a quick search.
That said...
I''ve been positively thrilled with RSpec for use outside of Rails.
It has been in my attempts
2007 Oct 17
15
Any tips on teaching BDD with RSpec?
Hi
I hope this is not OT. I''m training my replacement at work to do BDD
Rails development. He''s done a CS/maths degree but has no
professional programming experience, so he''s never NOT done a project
without BDD. In a way I am jealous of his unspoilt situation :)
I''ve gone about things this way:
* first teach him some Ruby (he did mainly Java at
2009 Apr 22
15
Why RSpec?
I like Shoulda. Sometimes I like plain old Test::Unit. Cucumber
gives me a different thought process.
I''d just like to hear some thoughts on why RSpec? What does it buy me
that I can''t get with Shoulda? I just can''t seem to think in RSpec.
Where is there a good example of RSpec tests that will help me grasp
the right path?
Thanks!
--
Amos King
2007 May 24
9
Mocking, changing method interfaces and integration tests
Suppose we have a method ''foo'' which internally uses another method
''bar''.
Being good BDDers we mock out the ''bar'' method. After all, we only
want to spec the ''foo'' method - actually running the ''bar'' method
means slower, less maintainable and brittler specs. That''s why we <3
mocking,
2007 Aug 24
26
testing behaviour or testing code?
hypothetical question for all you BDD experts:
I want to make sure that a :list action always returns widgets in
alphabetical order. There''s at least 2 ways of doing this:
it "should fetch items in alphabetical order" do
Widget.should_receive(:find).with(:order => "name ASC")
get :list
end
it "should fetch items in alphabetical order" do
[:red,
2008 Mar 11
2
for a beginner - good rspec examples?
I''m learning to use rspec and I want to see some good examples.
Any recommendations of open source projects that demonstrate the use
of rspec?
So far I''ve found:
1) the Caboose sample app (http://sample.caboo.se/)
2) the Altered Beast forums app (http://beast.caboo.se/forums/1/topics/4650
)
Any others come to mind?
I''m especially interested in seeing
2007 Oct 04
16
Spec/Test Speed
Just wanted to pick some smart people about this topic: What are you
guys doing to increase the speed of your specs?
I''m a big fan of autotest, but right now my current project has 438
specs (for rails). Most of them are in the model, and for all of
them we are hitting the database (they are more functional specs than
unit-tests). The whole suite takes 112 seconds (meaning the
2007 Oct 19
27
Assumption tests
Hi all,
I''ve been thinking about the whole validator/relationship speccing
issue, and I came up with a suggestion, which I''d love to get some
feedback on.
The full article is available at http://www.inter-sections.net/
2007/10/19/what-to-test-and-specify-and-where-to-do-it/ , with the
relevant bit being about halfway down, but here''s the gist of it:
1.