Modern Vim by Drew Neil
Author:Drew Neil
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf
Re-Running the Most Recent Test Runner
When practicing test-driven development, you’ll switch frequently between the test and implementation files. What if you want to use a test runner command when you don’t have a test file open? That’s where the :TestLast command comes in. You can use this to re-run the test runner that you used most recently.
To try this out, activate the testing-rb project and run the last test by itself:
=> :tablast
=> :normal G
=> :TestNearest
<= bundle exec rspec spec/homophoner_spec.rb:25
...
The testing-rb directory contains a break-things.diff patch file, which will cause the tests to fail. Apply the patch, then open the implementation file:
=> :!patch lib/homophoner.rb break-things.diff
=> :edit! lib/homophoner.rb
In this context, running :TestNearest makes no sense because the active buffer is not a test file. But you can use :TestLast to re-run the last test:
=> :TestLast
<= bundle exec rspec spec/homophoner_spec.rb:25
You’ll see some failures this time. If you like a challenge, study the error message and see if you can fix the failing test. (Take a peek inside the break-things.diff file if you want a hint!)
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12587)
Hello! Python by Anthony Briggs(9926)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9800)
The Mikado Method by Ola Ellnestam Daniel Brolund(9786)
Dependency Injection in .NET by Mark Seemann(9347)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7770)
Grails in Action by Glen Smith Peter Ledbrook(7704)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7566)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7147)
Microservices with Go by Alexander Shuiskov(6908)
Practical Design Patterns for Java Developers by Miroslav Wengner(6825)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6767)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6423)
Angular Projects - Third Edition by Aristeidis Bampakos(6185)
The Art of Crafting User Stories by The Art of Crafting User Stories(5705)
NetSuite for Consultants - Second Edition by Peter Ries(5637)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5447)
Kotlin in Action by Dmitry Jemerov(5073)
