Stateless Code | Codecast: Create a RubyGem 56: Refactor roll_ability_scores Specs @StatelessCode | Uploaded September 2021 | Updated October 2024, 2 hours ago.
This is the 56th video in the NerdDice create a RubyGem series. In this video Mike moves the existing specs to match the directory hierarchy from the previous video and then refactors the repeated code in the roll_ability_scores_spec into shared examples.
This video covers:
00:00:12 Introduction
00:01:33 Move existing specs to match hierarchy of source code files
00:04:47 Amend the previous commit to include the movement of the spec files, force-push
00:07:02 Fix CI benchmark failure
00:09:25 Create 3 shared example files
00:11:30 It behaves like the roll_ability_scores method
00:14:55 Require the shared example files
00:15:22 It behaves like an ability score method with no ability options
00:17:39 It behaves like an ability score method with ability options
00:19:22 It behaves like an ability score method with dice options
00:23:14 Fix RuboCop, commit, push
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
This is the 56th video in the NerdDice create a RubyGem series. In this video Mike moves the existing specs to match the directory hierarchy from the previous video and then refactors the repeated code in the roll_ability_scores_spec into shared examples.
This video covers:
00:00:12 Introduction
00:01:33 Move existing specs to match hierarchy of source code files
00:04:47 Amend the previous commit to include the movement of the spec files, force-push
00:07:02 Fix CI benchmark failure
00:09:25 Create 3 shared example files
00:11:30 It behaves like the roll_ability_scores method
00:14:55 Require the shared example files
00:15:22 It behaves like an ability score method with no ability options
00:17:39 It behaves like an ability score method with ability options
00:19:22 It behaves like an ability score method with dice options
00:23:14 Fix RuboCop, commit, push
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.