Sha256: ac2ae814675c71882040802905313efc91749ea2de88a681e9177b08df315a00
Contents?: true
Size: 485 Bytes
Versions: 3
Compression:
Stored size: 485 Bytes
Contents
#!/usr/bin/env ruby # -*- coding: utf-8 -*- $:.unshift File.join(File.dirname(__FILE__)) require 'lib/stdout/output' require 'minitest/autorun' class YourClass def self.some_method puts "aaa" puts "bbb" puts "ccc" end end class TestYourClass < MiniTest::Unit::TestCase def test_some_method expected = [ "aaa\n", "bbb\n", "ccc\n" ] result = Stdout::Output.capture{ YourClass.some_method } assert_equal(expected, result) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stdout-0.0.3 | demo2.rb |
stdout-0.0.2 | demo2.rb |
stdout-0.0.1 | demo2.rb |