Skip to content

Instantly share code, notes, and snippets.

@sonianand11
Last active August 29, 2015 14:02
Show Gist options
  • Save sonianand11/8120a690ad493f5b999b to your computer and use it in GitHub Desktop.
Save sonianand11/8120a690ad493f5b999b to your computer and use it in GitHub Desktop.
This is for testing
class Foo
def initialize(thing)
@thing = thing
end
def test_me
if @thing.big?
'Big!'
else
'Small!'
end
end
end
require "test/unit"
class TestFoo < Test::Unit::TestCase
def test_simple
assert_equal('Big!', Foo.new('Big!').test_me )
end
end
@richmolj
Copy link

class Foo
  def initialize(thing)
    @thing = thing
  end

  def test_me
    if @thing.big?
      'Big!'
    else
      'Small!'
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment