# encoding: utf-8 require 'spec_helper' require 'todos_export/std_out' describe TodosExport::StdOut do context '#output' do it 'normal' do input = StringIO.new output = StringIO.new terminal = HighLine.new(input, output) main = TodosExport::Main.new('spec/resources') main.find_exportables s = TodosExport::StdOut.new(main) terminal.say(s.output) output.string.gsub("\e[32m", '').gsub("\e[0m", '').should == "Todos ===== - Find a kinder message spec/resources/ruby_file_with_todos.rb:12 - Make a list spec/resources/ruby_file_with_todos.rb:18 - Add more cheese types spec/resources/ruby_file_with_todos.rb:26 - Add more region cheeses spec/resources/ruby_file_with_todos.rb:35 - Personalize the class to your taste spec/resources/ruby_file_with_todos.rb:41 - Be a better Ruby file spec/resources/sub_directory/another_ruby_file_with_todos.rb:1 Fixmes ====== - This is a useless class, what we really need to do is sit down and eat some cheese spec/resources/ruby_file_with_todos.rb:2 - Use case statement spec/resources/ruby_file_with_todos.rb:22 Bugs ==== - This should be false spec/resources/ruby_file_with_todos.rb:46 - This should say it's a Ruby file spec/resources/sub_directory/another_ruby_file_with_todos.rb:2 " end it 'none' do main = TodosExport::Main.new('spec/spec_helper.rb') main.find_exportables s = TodosExport::StdOut.new(main) s.output.should == '' end end end