require File.expand_path("../spec_helper", __FILE__) module Danger describe Danger::DiffTodoFinder do let(:subject) { Danger::DiffTodoFinder.new } describe "#find_diffs_containing_todos" do %w(TODO TODO: todo todo: FIXME fixme FIXME: fixme).each do |marker| it "identifies a new '#{marker}' as a todo" do diff = sample_diff("+ # #{marker} some todo") todos = subject.find_diffs_containing_todos([diff]) expect(todos).to_not be_empty end end # those comment indicators are ripped off https://github.com/pgilad/leasot %w(# {{ -- // /*