Permalink
Browse files

Fixed a bug in the text method, it would contain dates when it should…

…n't.
  • Loading branch information...
1 parent 4113641 commit cf51393762a792c68fe2f6d1293bd70ee6066cb6 @samwho committed Mar 31, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 lib/todo-txt/task.rb
  2. +1 −1 spec/todo-txt/task_spec.rb
View
@@ -85,6 +85,7 @@ def projects
# task.text #=> "Testing!"
def text
@text ||= orig.
+ gsub(self.class.date_regex, '').
gsub(self.class.priotity_regex, '').
gsub(self.class.contexts_regex, '').
gsub(self.class.projects_regex, '').
@@ -38,7 +38,7 @@
end
it 'should be able to get just the text, no contexts etc.' do
- task = Todo::Task.new "(B) This is a sweet task. @context +project"
+ task = Todo::Task.new "(B) 2012-03-04 This is a sweet task. @context +project"
task.text.should == "This is a sweet task."
end

0 comments on commit cf51393

Please sign in to comment.