Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

List of Figures

List of Tables

List of Listings

Preface

Acknowledgments

About this Book

1. Ruby techniques

Chapter 1. Ruby under the microscope

1.1. Why Ruby now?

1.1.1. Optimizing developer cycles

1.1.2. Language features

1.2. Ruby by example

1.3. Facets of Ruby

1.3.1. Duck typing

1.3.2. Simplicity

1.3.3. DRY efficiency

1.3.4. Functional programming

1.4. Metaprogramming

1.4.1. Getting started with metaprogramming

1.4.2. Domain-specific languages

1.4.3. Refining your metaprogramming

1.5. Summary

Chapter 2. Testing Ruby

2.1. Testing principles

2.1.1. Why bother with testing?

2.1.2. Types of testing

2.1.3. Testing workflow

2.2. Test-driven development with Ruby

2.3. Behavior-driven development with RSpec

2.3.1. What is behavior-driven development?

2.3.2. Testing with RSpec

2.4. A testing environment

2.4.1. Setting up a baseline with fixture data

2.4.2. Faking components with stubs

2.4.3. Setting behavior expectations with mock objects

2.5. Testing your tests

2.5.1. Testing code coverage

2.5.2. Testing quality with Heckle

2.6. Summary

Chapter 3. Scripting with Ruby

3.1. Scripting with Ruby

Problem

Solution

Discussion

3.2. Automating with OLE and OSA