Fix typo in BoutiqueInventory

In the BoutiqueInventoryTest file, the method name
test_stock_for_item_for_some_in_stock_in_last_postion
contains a typo. The correct spelling should be position.

Proposed change:

  • Rename test_stock_for_item_for_some_in_stock_in_last_postion
    → test_stock_for_item_for_some_in_stock_in_last_position

Is it okay if I open a PR to fix this?

2 Likes

This isn’t in the Ruby subforum so I’m CCing @kotp for visibility

The link might not take me where you believe it takes me. This goes to my exercise page, rather than the general page.

But yes, @lemonade-37 I presume the patch is going to look like:

diff --git i/exercises/concept/boutique-inventory/boutique_inventory_test.rb w/exercises/concept/boutique-inventory/boutique_inventory_test.rb
index 1de35af3..b94b46ef 100644
--- i/exercises/concept/boutique-inventory/boutique_inventory_test.rb
+++ w/exercises/concept/boutique-inventory/boutique_inventory_test.rb
@@ -86,7 +86,7 @@ class BoutiqueInventoryTest < Minitest::Test
     assert_equal({ s: 1, xl: 4 }, BoutiqueInventory.new(items).stock_for_item("Shoes"))
   end
 
-  def test_stock_for_item_for_some_in_stock_in_last_postion
+  def test_stock_for_item_for_some_in_stock_in_last_position
     shoes = { price: 30.00, name: "Shoes", quantity_by_size: { s: 1, xl: 4 } }
     coat = { price: 65.00, name: "Coat", quantity_by_size: { s: 2 } }
     handkerchief = { price: 19.99, name: "Handkerchief", quantity_by_size: { m: 3, l: 2 } }
1 Like

“The link” refers to “https://exercism.org/tracks/ruby/exercises/boutique-inventory”, correct? If so, that is the intended one.
I have attached the URL for the relevant Exercise for your reference.


Yes. I would like to make the kind of fix you suggested in the diff. However, in other communities regarding typos, I was told that since submitted answers would become invalid, the method names in the test cases cannot be modified. Is it acceptable to modify them here?

Modifying the test name doesn’t impact solutions. Modifying the name of the function which the test calls, ie what the exercises requires you implement, can invalidate the solution. This can be done. However, the benefit of the change needs to be weighed against the cost of invalidating solutions.

2 Likes

Thank you for your response. I understand the trade-off.
I will proceed with the revisions.

@kotp

I understand your inquiry. I have posted the following question in another topic:

By the way, where is the Ruby subforum? Am I posting topics incorrectly within my Exercism Community?
I’d appreciate it if you could let me know for future contributions.

I’ve created a pull request. Please review it.

1 Like

Latest Programming/Ruby topics - Exercism is where the category/topic is.

Changed the category from “Programming Ruby” to “Exercism”.

“Programming Ruby” is the correct place for this.

Thank you. exercism/ruby#1782 approved and applied!

Should the following four Topics I created be moved to the “Programming Ruby” section?

Also, going forward, if I find any issues or typos while solving Exercism problems, should I create Topics in the “Programming Ruby” section?

Wherever @IsaacG said it goes, that is where it goes.

We’ve largely been using “Programming > $TRACK” for track specific issues with the general understanding that maintainers in general are more likely to be following those categories.

1 Like

@IsaacG @kotp
Understood. Thank you for your response.
Since all existing Topics are from Exercism’s Ruby units, I’ll change them to “Programming Ruby”.
Also, thank you for letting me know about future topics as well!

The pull request has been merged, so we will close this topic as well.
Thank you very much for your help.

1 Like