class Sample def initialize(msg) @msg = msg end def say @msg end def scream @msg.to_s.upcase.to_sym end end require 'test_helper' require 'sample' class SampleTest < ActiveSupport::TestCase setup do @sample = Sample.new :hello end test 'sample 1' do assert_equal @sample.say, :hello end test 'sample 2' do assert_equal @sample.scream, :HELLO end end