The testing strategy from my last blog post worked! I added three tests tonight that proved the strategy out on the create open mics endpoint. I have three more tests to add to cover the creation of drafts, then several more to cover the update endpoint, but the idea has basically been proven out. Once … Continue reading My create/update testing strategy worked
Solving for the hard tests
I've been a little lost on how I was going to test the create and update actions. I don't want to write tests for every field. I don't want a lot of duplicate code that will get out of sync. I also feel awkward about testing the model directly for validations when I'm testing the … Continue reading Solving for the hard tests
Copy & paste, find and replace, 56 tests
As of today, I have tests for the OpenMicsAdminControlller :index, :new, :edit, and :delete routes. I don't know how I'd like to approach testing the :create and :update routes yet, so I'm skipping those for now. Last week I started migrating parts of the VenuesController to a VenuesAdminController, but left it in an incomplete state … Continue reading Copy & paste, find and replace, 56 tests
36 SacMusic tests
Nothing too exciting, but I'm up to 36 tests on SacMusic. I did the open mic refactor, splitting it into an open mic controller and open mic admin controller earlier this week. Now I'm trying to add testing to the open mics admin endpoint. I'm doing like one endpoint a day, just trying to keep … Continue reading 36 SacMusic tests
Hella procrast-coding
I want to put a blog on SacMusic so I can write about the site on the site instead of here. I started implementing the feature, and the pile of crap that was the code base overwhelmed now. Since then, I've added RuboCop for linting, added a couple dozen tests, and have made a bunch … Continue reading Hella procrast-coding
AGPL: an ambiguous pile of crap
I need an object storage solution for SacMusic's local development. I was looking at MinIO, but their take on the AGPL is pretty dang viral: Combining MinIO software as part of a larger software stack triggers your GNU AGPL v3 obligations. The method of combining does not matter. When MinIO is linked to a larger … Continue reading AGPL: an ambiguous pile of crap
Up to 22 tests
I got a second wind of energy and added an additional 10 test tonight. The user facing pages are now all tested. Of course, I ran into some trouble. If you throw a not found exception in a controller, the exception bubbles up to the test and breaks it before you can assert it returns … Continue reading Up to 22 tests
SacMusic active tests: 12
It's been another busy evening working on the testing suite, though the fact I've only added 3 tests doesn't really feel like it reflects that. There was a lot of test infrastructure type work. I installed FactoryBot I figured out how to set up RSpect support files to include modules I added FactoryBot, Devise and … Continue reading SacMusic active tests: 12
Number of active tests: 9
I added three more tests today: Homepage returns items for each day Homepage returns today's events first Homepage will display an event under each day it runs These are honestly some of the most critical tests for the whole site. I've broken some of these before on this version and previous. There was also some … Continue reading Number of active tests: 9
SacMusic number of active tests: 6
I finally have some tests on SacMusic. Like RuboCop, it's running as a pre-commit hook instead of in CI. But I don't want to invest too much additional time into my Jenkinsfile: I'd like to try replacing Jenkins with Drone later this year to see how that goes. Getting up and running with RSpec feels … Continue reading SacMusic number of active tests: 6