Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Return a list of all open tickets that are to be reviewed.

  • Loading branch information...
commit 29cd12008ec0585e33c9ed62ab6dab21fbe44fbc 1 parent 9bf8ef2
@alloy alloy authored
Showing with 18 additions and 0 deletions.
  1. +10 −0 lib/macruby_bugmash_bot/trac.rb
  2. +8 −0 spec/trac_spec.rb
View
10 lib/macruby_bugmash_bot/trac.rb
@@ -41,6 +41,16 @@ def user(name)
end
end
+ def marked_for_review
+ result = []
+ @active_tickets.each { |id, t| result << id if t[:marked_for_review] }
+ if result.empty?
+ ["There are currently no open tickets marked for review."]
+ else
+ result.sort.map { |id| ticket_message(id) }
+ end
+ end
+
# Returns a ticket that nobody is working on yet, in ascending order.
def open_ticket
ot = nil
View
8 spec/trac_spec.rb
@@ -121,5 +121,13 @@ def self.raw_active_tickets_feed
end
it "returns a list of tickets that are marked for review" do
+ @trac.marked_for_review.should == ["There are currently no open tickets marked for review."]
+ @trac.assign_ticket(81, "alloy")
+ @trac.mark_for_review(81, "alloy")
+ @trac.assign_ticket(47, "lrz")
+ @trac.mark_for_review(47, "lrz")
+ @trac.assign_ticket(19, "alloy")
+ @trac.mark_for_review(19, "alloy")
+ @trac.marked_for_review.should == ["#19: Problems with method_missing (http://www.macruby.org/trac/ticket/19)", "#47: Cannot pass a :symbol directly as a named parameter (http://www.macruby.org/trac/ticket/47)", "#81: Enumerable::Enumerator seems to be broken (http://www.macruby.org/trac/ticket/81)"]
end
end

0 comments on commit 29cd120

Please sign in to comment.
Something went wrong with that request. Please try again.