I’ve just finished the workshop, and have jotted down a few suggestions that might be useful if thoughtbot eventually plans to review the content.
-
The concepts of “feature” and “scenario” are presented simultaneously but the content doesn’t mention any difference between them (e.g: why is “manage todos” a feature and “create todo” a scenario vs considering small “create todo” or “mark todo as complete” small features?).
-
When writing the “visit home page” scenario, you recommend testing assertions with data-* attributes to decouple tests from design-only markup but the rest of the todo app’s specs use CSS classes. I like that guideline a lot and plan to use it from now on though, is it an actual practice at thoughtbot?
-
The methods declared in ApplicationController are public (and therefore could get inadvertently exposed as actions in the inheriting controllers) – I know it’s not a production app and out of the workshop’s focus, so it’s a very minor detail.
-
The “view only my todos” scenario creates data programatically instead of using the UI, but that’s not the case in the other tests. Perhaps it’s just a shortcut to save testing/video time?
-
I’ve followed the workshop with Rails 4 (at my own risk ) and only found a couple relevant difference in the app’s code:
todos_controller#create
needsparams.permit
instead of the model’sattr_accessor
and the tests got a bit hairy before adding FactoryGirl. Other than that everything worked great. -
Some dependencies have poor or no support for Rails 4 though, I had to use a fork of
guard-spork
and usejasminerice
from the GitHub repo because it hasn’t been released to the public yet (despite being 4 months old). -
Looks like simplecov (I’m using 0.8.2) doesn’t count as missing lines those from files that aren’t covered at all (e.g: if I remove the “complete todo” test, CompletionsController doesn’t apear in the report so the coverage is still 100%). There is an open issue about it but you may want to mention it.
-
Those using the current
twitter
gem will have extra work: it not only uses a different configuration setup, but has also changed its API switching to instance-based calls. Given that the fake twitter client has to mimic the gem’s API, several changes need to be made to this episode. Those interested can check out my repo, I’d appreciate any feedback you have. -
I found useful to commit failing and passing specs separately app1, app2. I think it can help to follow the workflow when reviewing the project in retrospective.
I’ve enjoyed the first five videos a lot: I’ve learned a few things already despite being familiarized with Rails testing and having followed just a couple videos. I can notice your attention to detail and appreciate every little advice that you provide, even more if it isn’t strictly related to the workshop’s topic.
In contrast, I didn’t get too much value from the last couple videos – which makes sense given their length. The instructions to install Jasmine were outdated and no real tests were included, I would probably move that content to a separate workshop. The conclusion was a quick recap of the table of content, which is nice but doesn’t add anything new.
I have a question about the workshop itself, so probably for @joshclayton: how can I flag the workshop as finished in order to take another one? My apps are here and here if you want to check them out. There are some implementation differences between the videos and my code due to new lib versions that I mentioned above (Rails 4, twitter gem) but overall I’ve followed the workshop’s path.