Skip to content

Instantly share code, notes, and snippets.

@nosolopau
Created February 5, 2016 16:11
Show Gist options
  • Save nosolopau/b40fbc33acfefa929d21 to your computer and use it in GitHub Desktop.
Save nosolopau/b40fbc33acfefa929d21 to your computer and use it in GitHub Desktop.
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