Ember.js - Testing on Rails
Ember.js - Testing on Rails
Free!
Minimum price
$0.00
Suggested price
Ember.js - Testing on Rails

This book is 90% complete

Last updated on 2014-05-05

About the Book

Now that Ember.js is stabilizing many developers are looking for information on how to create a comprehensive test suite for their apps.  Integrating Ember with Ruby on Rails is great for developer happiness, but building an automated test suite which integrated the Ember fronted seems to be an area that needs more information.

In this book I will cover

  • Building an app with Rails 4 and Ember.js
  • Creating an automated test suite which covers both front and backend
  • The hooks available in Ember to allow testing
  • Testing relationships in Ember
  • Developing your own testing helpers

I hope you enjoy the book and look forward to your feedback.

In order to prevent any potential disappointment - this is not a beginners level book for Rails and JavaScript, there's an expectation that you know the basics.  I make every attempt to keep everything as straightforward as possible, but the focus here is on testing and integrating the two frameworks.  If you've got a fair bit of experience with Ember, you may find the book of limited use.

---------

If you're not a Rails developer, you'll still find benefit from the testing strategies, but the book has a significant Rails focus.

Just to be really clear, Ember is still in constant development, but I will aim to keep up to date with what's going on and will adjust the book to deal with any changes that affect the content.  If you discover a problem, let me know and I'll get on to it as soon as possible!

WARNING - Given the speed with which Ember has developed much of the information is now outdated.  I'm leaving it out here for FREE now because the information about working in a test driven style is still relevant, but much of the implementation is no longer functional.

About the Author

Martin Feckie
Martin Feckie

I'm an enthusiastic explorer of Ember.js and all things open source.  I'm obsessive about Test Driven Development and automation and love to share the things I discover along the way.

Table of Contents

  • Acknowledgements
  • Erratum
  • Introduction
    • A Bit About My Motivation
    • First There Was Rails
    • Along Came jQuery
    • Javascript IV -Ember - A New Hope
    • Testing to the Rescue
  • Design Choices, the Golden Path and ‘Why Didn’t You Include / Use / Show X, Y, Z?”
  • Chapter One - Bootstrapping Our App
    • What are we going to build?
    • Prerequisites
    • Generating Our App
    • Getting Rid of Some Junk
    • Some Additional Development Dependencies
    • Install Ember
  • Chapter Two - Testing Setup
    • RSpec
    • Teaspoon
  • Chapter Three - Routing Specs
    • QUnit Specs (or Are They Tests?)
    • Creating a Contacts Route
    • And So a Problem Presents Itself
    • An Abstraction Trying to Get Out?
  • Chapter Four - Getting Started With Data Rendering
    • Models
    • Unit Testing Our Model
    • An Unexpected Problem
  • Chapter Five - Nested Routes
    • Defining Routes Within Resources
    • Rendering the Individual Contact
    • Refactor Tests
    • An Alternate Way of Viewing Our Specs
    • Navigating Around the App
  • Chapter Six - Persisting Data With Rails
    • Setting Up the Backend
    • Serializing the Data
    • Connecting the Backend to the Frontend!
    • More Routes Necessary
    • Adding Contacts
    • Deleting a Contact
  • Chapter 7 - Relationships in Ember
    • A Place to Store Emails
    • Testing Relationships
    • Rendering Relationships
    • Wiring Up the Relationships to Rails
    • An Email Model
    • Contact Relationship
    • Email Relationship
    • Email Controller and Routes
    • Serializing and Relationships
  • Chapter 8 - Unit Testing Computed Properties
  • Chapter 9 - Creating and Updating Emails on the Frontend
    • Faking HTTP Requests
    • Reimplementing RESTAdapter in Tests
    • Saving Associations
    • Dealing With Failed Saves
    • Testing JSON Responses in Rails

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub