From: Milli Sami Date: 2012-08-20T19:32:56+09:00 Subject: Re: How to get the minitest capture_io method found in my specs? Ryan Davis wrote in post #1072862: > On Aug 20, 2012, at 00:10 , Milli Sami wrote: > >> This is my `spec/helper.rb` file: >> >> require 'minitest/autorun' >> require 'minitest/spec' >> require_relative '../lib/launcher' >> >> class MiniTest::Spec >> include MiniTest::Assertions >> end > > This isn't necessary. In fact, you only need the autorun and launcher > lines. > >> end >> end > > I'd start by cleaning up the above. it works for me: > > 10011 % ruby -Ilib -rminitest/autorun -e 'describe true do it "works" do > x = capture_io do puts "hi" end; p x end end' > Run options: --seed 27063 > > # Running tests: > > ["hi\n", ""] > . > > Finished tests in 0.000760s, 1315.7895 tests/s, 0.0000 assertions/s. > > 1 tests, 0 assertions, 0 failures, 0 errors, 0 skips > > > If you still can't get it to work, please file a bug. This is no the > right forum for minitest support. Well, it works when I run the spec via `ruby spec/...`. But fails with `rake`. Actually I'm running into this with the project I'm trying with `Hoe`. Since you said this is not the place for such issue, I've posted this issue at https://github.com/seattlerb/hoe/issues/30 Can you take a look into that? -- Posted via http://www.ruby-forum.com/.