From 2189c0e74d9a0255b15892966b0f5159b3f18758 Mon Sep 17 00:00:00 2001 From: Pedro Gaspar Date: Sat, 6 Apr 2019 02:03:32 +0100 Subject: [PATCH] resistor-colors: Rename to resistor-color-duo See https://github.com/exercism/problem-specifications/issues/1495 --- config.json | 2 +- .../generator/resistor_color_duo_case.rb | 7 ++++++ .../.meta/solutions/resistor_color_duo.rb} | 2 +- .../README.md | 6 ++--- .../resistor_color_duo_test.rb | 25 +++++++++++++++++++ .../.meta/generator/resistor_colors_case.rb | 7 ------ .../resistor-colors/resistor_colors_test.rb | 25 ------------------- 7 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 exercises/resistor-color-duo/.meta/generator/resistor_color_duo_case.rb rename exercises/{resistor-colors/.meta/solutions/resistor_colors.rb => resistor-color-duo/.meta/solutions/resistor_color_duo.rb} (91%) rename exercises/{resistor-colors => resistor-color-duo}/README.md (94%) create mode 100644 exercises/resistor-color-duo/resistor_color_duo_test.rb delete mode 100644 exercises/resistor-colors/.meta/generator/resistor_colors_case.rb delete mode 100644 exercises/resistor-colors/resistor_colors_test.rb diff --git a/config.json b/config.json index 5d17abccaa..5f98df954e 100644 --- a/config.json +++ b/config.json @@ -221,7 +221,7 @@ "math" ] }, - { "slug": "resistor-colors", + { "slug": "resistor-color-duo", "uuid": "57b0c57e-26a5-4ccf-aaf2-2fefddd918c1", "core": false, "unlocked_by": null, diff --git a/exercises/resistor-color-duo/.meta/generator/resistor_color_duo_case.rb b/exercises/resistor-color-duo/.meta/generator/resistor_color_duo_case.rb new file mode 100644 index 0000000000..dc471716f8 --- /dev/null +++ b/exercises/resistor-color-duo/.meta/generator/resistor_color_duo_case.rb @@ -0,0 +1,7 @@ +require 'generator/exercise_case' + +class ResistorColorDuoCase < Generator::ExerciseCase + def workload + assert_equal(expected, "ResistorColorDuo.value(#{colors})") + end +end diff --git a/exercises/resistor-colors/.meta/solutions/resistor_colors.rb b/exercises/resistor-color-duo/.meta/solutions/resistor_color_duo.rb similarity index 91% rename from exercises/resistor-colors/.meta/solutions/resistor_colors.rb rename to exercises/resistor-color-duo/.meta/solutions/resistor_color_duo.rb index 4bd5225197..674b310699 100644 --- a/exercises/resistor-colors/.meta/solutions/resistor_colors.rb +++ b/exercises/resistor-color-duo/.meta/solutions/resistor_color_duo.rb @@ -1,4 +1,4 @@ -module ResistorColors +module ResistorColorDuo COLORS = %w( black brown diff --git a/exercises/resistor-colors/README.md b/exercises/resistor-color-duo/README.md similarity index 94% rename from exercises/resistor-colors/README.md rename to exercises/resistor-color-duo/README.md index 248e7ac78b..0c778d7cec 100644 --- a/exercises/resistor-colors/README.md +++ b/exercises/resistor-color-duo/README.md @@ -1,4 +1,4 @@ -# Resistor Colors +# Resistor Color Duo If you want to build something using a Raspberry Pi, you'll probably use _resistors_. For this exercise, you need to know two things about them: @@ -37,11 +37,11 @@ the test file. Run the tests from the exercise directory using the following command: - ruby resistor_colors_test.rb + ruby resistor_color_duo_test.rb To include color from the command line: - ruby -r minitest/pride resistor_colors_test.rb + ruby -r minitest/pride resistor_color_duo_test.rb ## Source diff --git a/exercises/resistor-color-duo/resistor_color_duo_test.rb b/exercises/resistor-color-duo/resistor_color_duo_test.rb new file mode 100644 index 0000000000..ad338e9162 --- /dev/null +++ b/exercises/resistor-color-duo/resistor_color_duo_test.rb @@ -0,0 +1,25 @@ +require 'minitest/autorun' +require_relative 'resistor_color_duo' + +# Common test data version: 2.0.0 8b44ce1 +class ResistorColorDuoTest < Minitest::Test + def test_brown_and_black + # skip + assert_equal 10, ResistorColorDuo.value(["brown", "black"]) + end + + def test_blue_and_grey + skip + assert_equal 68, ResistorColorDuo.value(["blue", "grey"]) + end + + def test_yellow_and_violet + skip + assert_equal 47, ResistorColorDuo.value(["yellow", "violet"]) + end + + def test_orange_and_orange + skip + assert_equal 33, ResistorColorDuo.value(["orange", "orange"]) + end +end diff --git a/exercises/resistor-colors/.meta/generator/resistor_colors_case.rb b/exercises/resistor-colors/.meta/generator/resistor_colors_case.rb deleted file mode 100644 index 4e370b6f8d..0000000000 --- a/exercises/resistor-colors/.meta/generator/resistor_colors_case.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'generator/exercise_case' - -class ResistorColorsCase < Generator::ExerciseCase - def workload - assert_equal(expected, "ResistorColors.value(#{colors})") - end -end diff --git a/exercises/resistor-colors/resistor_colors_test.rb b/exercises/resistor-colors/resistor_colors_test.rb deleted file mode 100644 index b3c64b908b..0000000000 --- a/exercises/resistor-colors/resistor_colors_test.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'minitest/autorun' -require_relative 'resistor_colors' - -# Common test data version: 1.0.0 e1c6d44 -class ResistorColorsTest < Minitest::Test - def test_brown_and_black - # skip - assert_equal 10, ResistorColors.value(["brown", "black"]) - end - - def test_blue_and_grey - skip - assert_equal 68, ResistorColors.value(["blue", "grey"]) - end - - def test_yellow_and_violet - skip - assert_equal 47, ResistorColors.value(["yellow", "violet"]) - end - - def test_orange_and_orange - skip - assert_equal 33, ResistorColors.value(["orange", "orange"]) - end -end