Sha256: 23cdd061c9226c7fe7a2211ce476782a1a3d2ae7edc1f9455cf1274e5cf2a520

Contents?: true

Size: 1.46 KB

Versions: 83

Compression:

Stored size: 1.46 KB

Contents

exercise: Bob
version: 3
plan: 26
methods: hey
tests: |-
  # Go through the cases and check that Bob gives us the correct responses.
  is Bob.?hey(.<input><heyBob>), |.<expected description> for @($c-data<cases>);

version_comment: The version we will be matching against the exercise.
lib_comment: Look for the module inside the same directory as this test file.
plan_comment: This is how many tests we expect to run.
version_test_comment: "If the exercise is updated, we want to make sure other people testing\nyour code don't think you've made a mistake if things have changed!"
methods_comment: "Check that the class 'Bob' can use all of the methods\nneeded in the tests (only 'hey' for this one)."

unit: class
unit_comment: |-
  #`[
    Declare class 'Bob' with version and unit-scope the class
    i.e. everything in this file is part of 'Bob'.
  ]
example: |-
  method hey ( Str:D $_ --> Str:D ) {
    my \shouting = /<:L>/ ^ /<:Ll>/;
    given .trim {
      when .ends-with: ‘?’  {
        when shouting { ‘Calm down, I know what I'm doing!’ }
        default       { ‘Sure.’ }
      }
      when shouting { ‘Whoa, chill out!’ }
      when .not     { ‘Fine. Be that way!’ }
      default       { ‘Whatever.’ };
    }
  }
stub: |-
  method hey ($msg) {
    #`[
      Remove the comments and write some code here to pass the test suite.
      You can experiment with the code outside of this block,
      but no changes are needed for the test suite to pass.
    ]
  }

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.179 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.178 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.177 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.176 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.175 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.174 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.173 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.172 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.171 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.170 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.169 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.167 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.166 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.165 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.164 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.163 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.162 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.161 tracks/perl6/exercises/bob/.meta/exercise-data.yaml
trackler-2.2.1.160 tracks/perl6/exercises/bob/.meta/exercise-data.yaml