Skip to Main Content
Rails 5 Test Prescriptions
book

Rails 5 Test Prescriptions

by Noel Rappin
February 2018
Intermediate to advanced content levelIntermediate to advanced
406 pages
9h 52m
English
Pragmatic Bookshelf
Content preview from Rails 5 Test Prescriptions

Making the Test Pass

In this section you’ll set up the JavaScript and present some passing code without unit testing. In the next chapter you’ll set up JavaScript unit-testing tools and see how you might test-drive JavaScript features.

Rails 5.1 makes two important changes to the JavaScript environment:

  • jQuery is no longer a default dependency.
  • Webpack integration is available via the Webpacker gem.[31] [32]

Webpack is an optional replacement for the Rails asset pipeline and has the same general purpose: take files that might be written in JavaScript, CoffeeScript, TypeScript, Elm, or another language, and build them into JavaScript files that can be passed to the browser. Webpack’s advantage is that it’s flexible, it’s tied into the current ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Rails 4 Test Prescriptions

Rails 4 Test Prescriptions

Noel Rappin
Agile Web Development with Rails 5.1

Agile Web Development with Rails 5.1

Sam Ruby, David B. Copeland, Dave Thomas
Rspec Essentials

Rspec Essentials

Mani Tadayon

Publisher Resources

ISBN: 9781680505566Errata Page