0.0
No release in over a year
This is the un-official RubyGem for the Beginner.Codes Discord server. Test your daily challenge solutions with provided tests automatically to ensure you have a good solution.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 0.7.2
~> 0.8.0
 Project Readme

Beginner.Codes Ruby Gem

This is the un-official Ruby Gem for the Beginner.Codes Discord server.

Running Challenge Tests

  • Install the package: gem install beginner.codes
  • Import the test runner: require 'challenges'
  • Run the tests, passing in the challenge number and your solution function: test(458, :n_differences) for a function or test(458, n_differences) for a lambda function
  • For informatino only you can pass either description: true or examples: true
require 'challenges'

def n_differences(nums)
    nil
end  # Your code goes here!!!

test(458, :n_differences)

# OR You can use a Lambda Proc

n_differences = -> (x) {x*2}

test(458, n_differences)

This will handle downloading the necessary challenge test cases and will run them against your code. It will show you which tests failed, what went wrong, and how many tests succeeded.

Additionally, you can view the description and examples when running the tests by adding some options to the test function

test(458, :n_differences, description: true, examples: true)