-
-
Save nosolopau/b40fbc33acfefa929d21 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative "echo" | |
require "minitest/autorun" | |
require 'securerandom' | |
class TestEcho < Minitest::Test | |
def setup | |
@echo = Echo.new | |
end | |
def test_simple_scenario | |
@echo.miau 'one' | |
assert_equal 'one', @echo.miau | |
end | |
def test_for_smart_asses | |
string = SecureRandom.hex | |
number = SecureRandom.random_number 100 | |
@echo.public_send(string, number) | |
assert_equal number, @echo.public_send(string) | |
@echo_2 = Echo.new | |
assert_equal number, @echo_2.public_send(string) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment