Skip to main content

A. D.'s Library tagged ror   View Popular

02 Aug 08

Real world Rails, Part 4: Testing strategies in Ruby on Rails

  • Many developers confuse the ideas behind stubbing and mocking. Stubbing
    simply replaces a real-world implementation with a simpler implementation.
    In Listing 4, the stub replaced our full login system with a simple
    substitute. A stub's job is to simulate the real world. Mocks are
    not stubs. A mock object, instead, is like a gauge that measures the way
    your application uses an interface. I'll discuss stubs in more detail
    later and show you a few examples.
  • One of the most critical decisions you'll ever make is how much you test.
    If you don't test enough, you'll compromise your code quality and often
    even slow down your delivery time. You can test too much, too. Test too
    much, and you'll possibly miss deadlines that are important to the
    business. To make an informed decision about how much to test, you need to
    accurately measure how much you're already testing. One of the most
    critical measurements for testing is code coverage.

rails-fast-sessions - Google Code

1 - 20 of 56 Next › Last »
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo