Cargando…

Rails 4 test prescriptions : build a healthy codebase /

Annotation

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Rappin, Noel, 1971- (Autor)
Otros Autores: Beighley, Lynn (Editor )
Formato: Electrónico eBook
Idioma:Inglés
Publicado: [Frisco, TX] : Pragmatic Programmers, [2014]
Colección:Pragmatic programmers.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Cover; Table of Contents; Acknowledgments; 1. Introduction; A Test-Driven Fable; Who You Are; Testing First Drives Design; What Is TDD Good For?; When TDD Needs Some Help; Words to Live By; A Word About Tools, Best Practices, and Teaching TDD; Coming Up Next; Changes in the Second Edition; 2. Test-Driven Development Basics; Infrastructure; The Requirements; Installing RSpec; Where to Start?; Running Our Test; Making Our Test Pass; The Second Test; Back on Task; Adding Some Math; Our First Date; Using the Time Data; What Weâ#x80;#x99;ve Done; 3. Test-Driven Rails; And Now Letâ#x80;#x99;s Write Some Rails.
  • The Days Are Action-PackedWho Controls the Controller?; A Test with a View; What Have We Done? And Whatâ#x80;#x99;s Next?; 4. What Makes Great Tests; The Big One; The Big Two; The More Detailed Five: SWIFT Tests; Using SWIFT Tests; 5. Testing Models; What Can We Do in a Model Test?; What Should I Test in a Model Test?; Okay, Funny Man, What Makes a Good Set of Model Tests?; Refactoring Models; A Note on Assertions per Test; Testing What Rails Gives You; Testing ActiveRecord Finders; Testing Shared Modules and ActiveSupport Concerns; Write Your Own RSpec Matchers; Modeling Data.
  • 6. Adding Data to TestsWhatâ#x80;#x99;s the Problem?; Fixtures; Factories; Dates and Times; Fixtures vs. Factories vs. Test Doubles; 7. Using Test Doubles as Mocks and Stubs; Mock Objects Defined; Creating Stubs; Mock Expectations; Using Mocks to Simulate Rails Save; Using Mocks to Specify Behavior; More Expectation Annotations; Mock Tips; 8. Testing Controllers and Views; Testing Controllers; Simulating Requests in a Controller Test; Evaluating Controller Results; Testing Routes; Testing Helper Methods; Testing Views and View Markup; Presenters; Testing Mailers; Managing Controller and View Tests.
  • 9. MinitestGetting Started with Minitest; Minitest Basics; Running Minitest; Minitest and Rails Controllers; Minitest and Views; Minitest and Routing; Minitest Helper Tests; Mocha; Onward; 10. Integration Testing with Capybara and Cucumber; What to Test in an Integration Test; Setting Up Capybara; Outside-in Testing; Using Capybara; Making the Capybara Test Pass; Retrospective; Trying Cucumber; Setting Up Cucumber; Writing Cucumber Features; Writing Cucumber Steps; More-Advanced Cucumber; Is Cucumber Worth It?; Looking Ahead; 11. Testing for Security; User Authentication and Authorization.
  • Adding Users and RolesRestricting Access; More Access Control Testing; Using Roles; Protection Against Form Modification; Mass Assignment Testing; Other Security Resources; 12. Testing External Services; External Testing Strategy; Our Service Integration Test; Introducing VCR; Client Unit Tests; Why an Adapter?; Adapter Tests; Testing for Error Cases; Smoke Tests and VCR Options; The World Is a Service; 13. Testing JavaScript; Unit-Testing JavaScript; Our Real Jasmine Project; Testing Ajax Calls; Integration Testing with Capybara and JavaScript; JavaScript Fiddle.