Permalink
Browse files

Added current_iteration_number and first_iteration_start_time to proj…

…ect and projects.xml, added test to check if current iteration is not null
  • Loading branch information...
1 parent 076754e commit b668f02a3da01e826740002f3306574f5c181505 @anuradha-r anuradha-r committed Mar 14, 2012
Showing with 17 additions and 4 deletions.
  1. +2 −0 spec/fixtures/project.xml
  2. +4 −0 spec/fixtures/projects.xml
  3. +11 −4 spec/unit/pivotal-tracker/project_spec.rb
View
2 spec/fixtures/project.xml
@@ -2,6 +2,8 @@
<project>
<id>102622</id>
<name>Pivotal Tracker API Gem</name>
+ <first_iteration_start_time type="datetime">2011/12/05 06:00:00 UTC</first_iteration_start_time>
+ <current_iteration_number type="integer">4</current_iteration_number>
<iteration_length type="integer">1</iteration_length>
<week_start_day>Monday</week_start_day>
<point_scale>0,1,2,3</point_scale>
View
4 spec/fixtures/projects.xml
@@ -3,6 +3,8 @@
<project>
<id>102622</id>
<name>Pivotal Tracker API Gem</name>
+ <first_iteration_start_time type="datetime">2011/12/05 06:00:00 UTC</first_iteration_start_time>
+ <current_iteration_number type="integer">4</current_iteration_number>
<iteration_length type="integer">1</iteration_length>
<week_start_day>Monday</week_start_day>
<point_scale>0,1,2,3</point_scale>
@@ -53,6 +55,8 @@
<project>
<id>103014</id>
<name>Pivotal Tracker API Gem Target Project</name>
+ <first_iteration_start_time type="datetime">2010/10/02 08:00:00 UTC</first_iteration_start_time>
+ <current_iteration_number type="integer">14</current_iteration_number>
<iteration_length type="integer">1</iteration_length>
<week_start_day>Monday</week_start_day>
<point_scale>0,1,2,3</point_scale>
View
15 spec/unit/pivotal-tracker/project_spec.rb
@@ -5,21 +5,28 @@
before do
PivotalTracker::Client.token = TOKEN
@projects = PivotalTracker::Project.all
+ @project = @projects.first
end
it "should return an array of available projects" do
@projects.should be_a(Array)
end
- it "should be a project instance" do
+ it "should be a project instance" do
@projects.first.should be_a(PivotalTracker::Project)
end
- it "should not have nil in field first_iteration_start_time" do
- @projects.each do |pt|
- pt.first_iteration_start_time.should_not be_nil
+ it "should not have nil in field first_iteration_start_time" do
+ @projects.each do |pt|
+ pt.first_iteration_start_time.should_not be_nil
end
end
+
+ it "should not have nil in field current_iteration_number" do
+ @projects.each do |pt|
+ pt.current_iteration_number.should_not be_nil
+ end
+ end
end
context ".find" do

0 comments on commit b668f02

Please sign in to comment.