|
|
|
@ -34,9 +34,9 @@ Then /^show me the list of stories$/ do |
|
|
|
|
sprint_max = (sprints.map{|s| s.name} << "sprint").sort{|a,b| a.length <=> b.length}.last.length |
|
|
|
|
|
|
|
|
|
puts "\n" |
|
|
|
|
puts "\t| id | position | #{'subject'.ljust(subject_max)} | #{'sprint'.ljust(sprint_max)} |" |
|
|
|
|
puts "\t| #{'id'.ljust(3)} | #{'position'.ljust(8)} | #{'status'.ljust(12)} | #{'assignee'.ljust(12)} | #{'subject'.ljust(subject_max)} | #{'sprint'.ljust(sprint_max)} |" |
|
|
|
|
stories.each do |story| |
|
|
|
|
puts "\t| #{story.id.to_s.ljust(3)} | #{story.position.to_s.ljust(8)} | #{story.subject.ljust(subject_max)} | #{(story.fixed_version_id.nil? ? Sprint.new : Sprint.find(story.fixed_version_id)).name.ljust(sprint_max)} |" |
|
|
|
|
puts "\t| #{story.id.to_s.ljust(3)} | #{story.position.to_s.ljust(8)} | #{story.status.name[0,12].ljust(12)} | #{story.assigned_to.to_s[0,12].ljust(12)} | #{story.subject.ljust(subject_max)} | #{(story.fixed_version_id.nil? ? Sprint.new : Sprint.find(story.fixed_version_id)).name.ljust(sprint_max)} |" |
|
|
|
|
end |
|
|
|
|
puts "\n\n" |
|
|
|
|
end |
|
|
|
@ -96,4 +96,4 @@ Then /^the story should have a (.+) of (.+)$/ do |attribute, value| |
|
|
|
|
value = value.to_i |
|
|
|
|
end |
|
|
|
|
@story[attribute].should == value |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|