Sha256: 5735f8f099cc63ecd13ec95f414cd5ce2df6a7312302c67be4b86e55c9d06191

Contents?: true

Size: 1.04 KB

Versions: 19

Compression:

Stored size: 1.04 KB

Contents

require "spec_helper"

describe Redcar::TodoList::FileParser do
  before do
    TodoListSpecHelper.set_fixture_settings
    @parser = Redcar::TodoList::FileParser.new
    @tags   = @parser.parse_files(TodoListSpecHelper::Fixtures)
  end

  it "should find tags that are in the tag list" do
    @tags.keys.should include "FIXME"
    @tags.keys.should include "OPTIMIZE"
  end

  it "should find only colon'ed tags if that requirement is set in the settings" do
    Redcar::TodoList.storage['require_colon'] = true
    @parser = Redcar::TodoList::FileParser.new
    tags    = @parser.parse_files(TodoListSpecHelper::Fixtures)
    tags.keys.should include "OPTIMIZE"
    tags.keys.should_not include "FIXME"
    Redcar::TodoList.storage['require_colon'] = false
  end

  it "should not search files without included suffixes" do
    @tags.keys.should_not include "XXX"
  end

  it "should not search excluded files" do
    @tags.keys.should_not include "NOTE"
  end

  it "should ignore files in excluded dirs" do
    @tags.keys.should_not include "TODO"
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
redcar-0.13 plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.5dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.4dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.3dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.2dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.1dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-0.12.1 plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.13.0dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-0.12 plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.27dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.26dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.25dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.24dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.23dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.22dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.21dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.20dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.19dev plugins/todo_list/spec/todo_list/file_parser_spec.rb
redcar-dev-0.12.18dev plugins/todo_list/spec/todo_list/file_parser_spec.rb