napcs-pivotalrecord 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,317 @@
1
+ require File.join(File.dirname(__FILE__), "/../spec_helper")
2
+
3
+ describe Pivotal::Project do
4
+ before(:each) do
5
+ @service = "http://www.pivotaltracker.com/services/v2"
6
+ @token = "abcd"
7
+ Pivotal::Configuration.options[:api_key] = @token
8
+ FakeWeb.clean_registry
9
+ FakeWeb.allow_net_connect = false
10
+ end
11
+
12
+ after(:each) do
13
+ FakeWeb.clean_registry
14
+ FakeWeb.allow_net_connect = true
15
+ end
16
+
17
+ it "should create a new instance" do
18
+ p = Pivotal::Project.new "name" => "Hello", "id" => "1234"
19
+ p.name.should == "Hello"
20
+ p.id.should == "1234"
21
+ end
22
+
23
+ describe "with a project" do
24
+
25
+ before(:each) do
26
+ xml = %Q{<?xml version="1.0" encoding="UTF-8"?>
27
+ <project>
28
+ <id>4860</id>
29
+ <name>FeelMySkills</name>
30
+ <iteration_length type="integer">1</iteration_length>
31
+ <week_start_day>Monday</week_start_day>
32
+ <point_scale>0,1,2,3</point_scale>
33
+ </project>}
34
+ url = "#{@service}/projects/4860?token=#{@token}"
35
+ FakeWeb.register_uri(:get, url, :string => xml, :content_type => "application/xml", :status => ["200", "OK"])
36
+
37
+ end
38
+ it "should get the project" do
39
+ p = Pivotal::Project.find_by_id(4860)
40
+ p.name.should == "FeelMySkills"
41
+ end
42
+
43
+ describe "stories" do
44
+ before(:each) do
45
+ xml = %Q{<?xml version="1.0" encoding="UTF-8"?>
46
+ <stories type="array" count="14" total="14">
47
+ <story>
48
+ <id type="integer">300970</id>
49
+ <story_type>release</story_type>
50
+ <url>http://www.pivotaltracker.com/story/show/300970</url>
51
+ <current_state>accepted</current_state>
52
+ <description></description>
53
+ <name>rel_1-1-5</name>
54
+ <requested_by>Brian Hogan</requested_by>
55
+ <created_at type="datetime">2008/12/04 03:00:57 UTC</created_at>
56
+ <accepted_at type="datetime">2009/01/14 06:32:15 UTC</accepted_at>
57
+ <deadline type="datetime">2008/12/12 20:00:00 UTC</deadline>
58
+ <iteration>
59
+ <number>1</number>
60
+ <start type="datetime">2009/01/12 00:00:00 UTC</start>
61
+ <finish type="datetime">2009/01/19 00:00:00 UTC</finish>
62
+ </iteration>
63
+ </story>
64
+ <story>
65
+ <id type="integer">302045</id>
66
+ <story_type>bug</story_type>
67
+ <url>http://www.pivotaltracker.com/story/show/302045</url>
68
+ <current_state>accepted</current_state>
69
+ <description>CSS stylesheets for greybox are still referenced in templates causing errors in the logs</description>
70
+ <name>Remove references to Greybox</name>
71
+ <requested_by>Brian Hogan</requested_by>
72
+ <owned_by>Brian Hogan</owned_by>
73
+ <created_at type="datetime">2008/12/04 18:46:43 UTC</created_at>
74
+ <accepted_at type="datetime">2009/01/19 17:22:53 UTC</accepted_at>
75
+ <iteration>
76
+ <number>2</number>
77
+ <start type="datetime">2009/01/19 00:00:00 UTC</start>
78
+ <finish type="datetime">2009/01/26 00:00:00 UTC</finish>
79
+ </iteration>
80
+ </story>
81
+ <story>
82
+ <id type="integer">300931</id>
83
+ <story_type>bug</story_type>
84
+ <url>http://www.pivotaltracker.com/story/show/300931</url>
85
+ <current_state>accepted</current_state>
86
+ <description>The home page has no title set.</description>
87
+ <name>Get a title on the home page</name>
88
+ <requested_by>Brian Hogan</requested_by>
89
+ <owned_by>Brian Hogan</owned_by>
90
+ <created_at type="datetime">2008/12/04 02:22:00 UTC</created_at>
91
+ <accepted_at type="datetime">2009/01/19 17:23:11 UTC</accepted_at>
92
+ <iteration>
93
+ <number>2</number>
94
+ <start type="datetime">2009/01/19 00:00:00 UTC</start>
95
+ <finish type="datetime">2009/01/26 00:00:00 UTC</finish>
96
+ </iteration>
97
+ </story>
98
+ <story>
99
+ <id type="integer">300939</id>
100
+ <story_type>feature</story_type>
101
+ <url>http://www.pivotaltracker.com/story/show/300939</url>
102
+ <estimate type="integer">1</estimate>
103
+ <current_state>started</current_state>
104
+ <description>Images need to be linked and modalbox needs testing in other browsers besides FF and Safari.</description>
105
+ <name>Finish modalbox implementation</name>
106
+ <requested_by>Brian Hogan</requested_by>
107
+ <owned_by>Brian Hogan</owned_by>
108
+ <created_at type="datetime">2008/12/04 02:33:33 UTC</created_at>
109
+ <iteration>
110
+ <number>28</number>
111
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
112
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
113
+ </iteration>
114
+ </story>
115
+ <story>
116
+ <id type="integer">300495</id>
117
+ <story_type>feature</story_type>
118
+ <url>http://www.pivotaltracker.com/story/show/300495</url>
119
+ <estimate type="integer">3</estimate>
120
+ <current_state>started</current_state>
121
+ <description>Choose an item, edit it, and notice that the dropdown for file / url is not selected on load, causing the file or url field to not display.</description>
122
+ <name>Editing an item does not select the correct type</name>
123
+ <requested_by>Brian Hogan</requested_by>
124
+ <owned_by>Brian Hogan</owned_by>
125
+ <created_at type="datetime">2008/12/04 01:55:39 UTC</created_at>
126
+ <iteration>
127
+ <number>28</number>
128
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
129
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
130
+ </iteration>
131
+ </story>
132
+ <story>
133
+ <id type="integer">300423</id>
134
+ <story_type>feature</story_type>
135
+ <url>http://www.pivotaltracker.com/story/show/300423</url>
136
+ <estimate type="integer">3</estimate>
137
+ <current_state>started</current_state>
138
+ <description>A profile should be viewable using the iPhone or Touch.
139
+ The profile page should link to the portfolios.
140
+ items should display within the portfolios.</description>
141
+ <name>iPhone interface for viewing profiles</name>
142
+ <requested_by>Brian Hogan</requested_by>
143
+ <owned_by>Brian Hogan</owned_by>
144
+ <created_at type="datetime">2008/12/04 01:48:53 UTC</created_at>
145
+ <iteration>
146
+ <number>28</number>
147
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
148
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
149
+ </iteration>
150
+ </story>
151
+ <story>
152
+ <id type="integer">300923</id>
153
+ <story_type>feature</story_type>
154
+ <url>http://www.pivotaltracker.com/story/show/300923</url>
155
+ <estimate type="integer">1</estimate>
156
+ <current_state>unstarted</current_state>
157
+ <description>Add a &quot;contact us&quot; form that sends an email</description>
158
+ <name>Contact Us form</name>
159
+ <requested_by>Brian Hogan</requested_by>
160
+ <created_at type="datetime">2008/12/04 02:14:51 UTC</created_at>
161
+ <iteration>
162
+ <number>28</number>
163
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
164
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
165
+ </iteration>
166
+ </story>
167
+ <story>
168
+ <id type="integer">300518</id>
169
+ <story_type>feature</story_type>
170
+ <url>http://www.pivotaltracker.com/story/show/300518</url>
171
+ <estimate type="integer">1</estimate>
172
+ <current_state>unstarted</current_state>
173
+ <description>Add a send to friend link on portfolios</description>
174
+ <name>Send To Friend linke</name>
175
+ <requested_by>Brian Hogan</requested_by>
176
+ <created_at type="datetime">2008/12/04 01:57:22 UTC</created_at>
177
+ <iteration>
178
+ <number>28</number>
179
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
180
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
181
+ </iteration>
182
+ </story>
183
+ <story>
184
+ <id type="integer">306550</id>
185
+ <story_type>feature</story_type>
186
+ <url>http://www.pivotaltracker.com/story/show/306550</url>
187
+ <estimate type="integer">1</estimate>
188
+ <current_state>unscheduled</current_state>
189
+ <description>&quot;less than one year&quot; looks kinda funny. Can we do months instead?</description>
190
+ <name>Show months for skills less than one year</name>
191
+ <requested_by>Brian Hogan</requested_by>
192
+ <created_at type="datetime">2008/12/09 17:28:40 UTC</created_at>
193
+ </story>
194
+ <story>
195
+ <id type="integer">300932</id>
196
+ <story_type>feature</story_type>
197
+ <url>http://www.pivotaltracker.com/story/show/300932</url>
198
+ <estimate type="integer">1</estimate>
199
+ <current_state>unscheduled</current_state>
200
+ <description></description>
201
+ <name>Add meta tags to pro accounts</name>
202
+ <requested_by>Brian Hogan</requested_by>
203
+ <created_at type="datetime">2008/12/04 02:22:36 UTC</created_at>
204
+ </story>
205
+ <story>
206
+ <id type="integer">300927</id>
207
+ <story_type>feature</story_type>
208
+ <url>http://www.pivotaltracker.com/story/show/300927</url>
209
+ <estimate type="integer">3</estimate>
210
+ <current_state>unscheduled</current_state>
211
+ <description>Allow people to buy an annual subscription for a pro account. use paypal for this first iteration. Payments should be $25 a year for pro accounts. Look into recurring billing.</description>
212
+ <name>Implement Pro account subscription</name>
213
+ <requested_by>Brian Hogan</requested_by>
214
+ <created_at type="datetime">2008/12/04 02:19:59 UTC</created_at>
215
+ </story>
216
+ <story>
217
+ <id type="integer">300924</id>
218
+ <story_type>feature</story_type>
219
+ <url>http://www.pivotaltracker.com/story/show/300924</url>
220
+ <estimate type="integer">1</estimate>
221
+ <current_state>unscheduled</current_state>
222
+ <description></description>
223
+ <name>Implement Exception Notification plugin</name>
224
+ <requested_by>Brian Hogan</requested_by>
225
+ <created_at type="datetime">2008/12/04 02:15:15 UTC</created_at>
226
+ </story>
227
+ <story>
228
+ <id type="integer">300800</id>
229
+ <story_type>feature</story_type>
230
+ <url>http://www.pivotaltracker.com/story/show/300800</url>
231
+ <estimate type="integer">3</estimate>
232
+ <current_state>unscheduled</current_state>
233
+ <description>Request recommendations from people. People receive an email asking for the recommendation. A link in the email takes them to a special URL where they enter a plain-text recommendation. They can also opt out of making the recommendation. Opting out reduces the skill score by 1000 points. Recommendations are worth 1000 points each.</description>
234
+ <name>Add Recommendations</name>
235
+ <requested_by>Brian Hogan</requested_by>
236
+ <created_at type="datetime">2008/12/04 02:14:16 UTC</created_at>
237
+ </story>
238
+ <story>
239
+ <id type="integer">300472</id>
240
+ <story_type>feature</story_type>
241
+ <url>http://www.pivotaltracker.com/story/show/300472</url>
242
+ <estimate type="integer">1</estimate>
243
+ <current_state>unscheduled</current_state>
244
+ <description>Web site thumbnails are coming from Thumbalizer. Should we make a method to fetch those images and store them locally? </description>
245
+ <name>Deal with web thumbnails</name>
246
+ <requested_by>Brian Hogan</requested_by>
247
+ <created_at type="datetime">2008/12/04 01:53:56 UTC</created_at>
248
+ </story>
249
+ </stories>}
250
+ url = "#{@service}/projects/4860/stories?token=#{@token}"
251
+ FakeWeb.register_uri(:get, url, :string => xml, :content_type => "application/xml", :status => ["200", "OK"])
252
+ @project = Pivotal::Project.new("id" => "4860", :name => "FeelMySkills")
253
+
254
+ end
255
+
256
+ it "should get stories" do
257
+ @project.stories.should_not == []
258
+ end
259
+
260
+ end
261
+
262
+ end
263
+
264
+ describe "With projects" do
265
+
266
+ before(:each) do
267
+
268
+ xml = %Q{<?xml version="1.0" encoding="UTF-8"?>
269
+ <projects type="array">
270
+ <project>
271
+ <id>4860</id>
272
+ <name>FeelMySkills</name>
273
+ <iteration_length type="integer">1</iteration_length>
274
+ <week_start_day>Monday</week_start_day>
275
+ <point_scale>0,1,2,3</point_scale>
276
+ </project>
277
+ <project>
278
+ <id>20273</id>
279
+ <name>Rails Mentors</name>
280
+ <iteration_length type="integer">1</iteration_length>
281
+ <week_start_day>Monday</week_start_day>
282
+ <point_scale>0,1,2,3</point_scale>
283
+ </project>
284
+ <project>
285
+ <id>11172</id>
286
+ <name>rPulse</name>
287
+ <iteration_length type="integer">1</iteration_length>
288
+ <week_start_day>Monday</week_start_day>
289
+ <point_scale>0,1,2,3</point_scale>
290
+ </project>
291
+ <project>
292
+ <id>12510</id>
293
+ <name>snippetstash</name>
294
+ <iteration_length type="integer">1</iteration_length>
295
+ <week_start_day>Monday</week_start_day>
296
+ <point_scale>0,1,2,3</point_scale>
297
+ </project>
298
+ </projects>}
299
+ url = "#{@service}/projects?token=#{@token}"
300
+ FakeWeb.register_uri(:get, url, :string => xml, :content_type => "application/xml", :status => ["200", "OK"])
301
+
302
+ end
303
+
304
+
305
+
306
+ it "should should create an array of four projects" do
307
+ projects = Pivotal::Project.find_all
308
+ projects.length.should == 4
309
+ projects.each{|project| project.should be_a(Pivotal::Project)}
310
+ projects.detect{|project| project.name == "snippetstash"}
311
+ projects.detect{|project| project.name == "Rails Mentors"}
312
+ projects.detect{|project| project.name == "rPulse"}
313
+ projects.detect{|project| project.name == "FeelMySkills"}
314
+ end
315
+ end
316
+
317
+ end
@@ -0,0 +1,243 @@
1
+ require File.join(File.dirname(__FILE__), "/../spec_helper")
2
+
3
+ describe Pivotal::Story do
4
+ before(:each) do
5
+ @service = "http://www.pivotaltracker.com/services/v2"
6
+ @token = "abcd"
7
+ Pivotal::Configuration.options[:api_key] = @token
8
+ FakeWeb.clean_registry
9
+ FakeWeb.allow_net_connect = false
10
+ end
11
+
12
+
13
+ after(:each) do
14
+ FakeWeb.clean_registry
15
+ FakeWeb.allow_net_connect = true
16
+ end
17
+
18
+
19
+ describe "with many stories" do
20
+ before(:each) do
21
+ xml = %Q{<?xml version="1.0" encoding="UTF-8"?>
22
+ <stories type="array" count="14" total="14">
23
+ <story>
24
+ <id type="integer">300970</id>
25
+ <story_type>release</story_type>
26
+ <url>http://www.pivotaltracker.com/story/show/300970</url>
27
+ <current_state>accepted</current_state>
28
+ <description></description>
29
+ <name>rel_1-1-5</name>
30
+ <requested_by>Brian Hogan</requested_by>
31
+ <created_at type="datetime">2008/12/04 03:00:57 UTC</created_at>
32
+ <accepted_at type="datetime">2009/01/14 06:32:15 UTC</accepted_at>
33
+ <deadline type="datetime">2008/12/12 20:00:00 UTC</deadline>
34
+ <iteration>
35
+ <number>1</number>
36
+ <start type="datetime">2009/01/12 00:00:00 UTC</start>
37
+ <finish type="datetime">2009/01/19 00:00:00 UTC</finish>
38
+ </iteration>
39
+ </story>
40
+ <story>
41
+ <id type="integer">302045</id>
42
+ <story_type>bug</story_type>
43
+ <url>http://www.pivotaltracker.com/story/show/302045</url>
44
+ <current_state>accepted</current_state>
45
+ <description>CSS stylesheets for greybox are still referenced in templates causing errors in the logs</description>
46
+ <name>Remove references to Greybox</name>
47
+ <requested_by>Brian Hogan</requested_by>
48
+ <owned_by>Brian Hogan</owned_by>
49
+ <created_at type="datetime">2008/12/04 18:46:43 UTC</created_at>
50
+ <accepted_at type="datetime">2009/01/19 17:22:53 UTC</accepted_at>
51
+ <iteration>
52
+ <number>2</number>
53
+ <start type="datetime">2009/01/19 00:00:00 UTC</start>
54
+ <finish type="datetime">2009/01/26 00:00:00 UTC</finish>
55
+ </iteration>
56
+ </story>
57
+ <story>
58
+ <id type="integer">300931</id>
59
+ <story_type>bug</story_type>
60
+ <url>http://www.pivotaltracker.com/story/show/300931</url>
61
+ <current_state>accepted</current_state>
62
+ <description>The home page has no title set.</description>
63
+ <name>Get a title on the home page</name>
64
+ <requested_by>Brian Hogan</requested_by>
65
+ <owned_by>Brian Hogan</owned_by>
66
+ <created_at type="datetime">2008/12/04 02:22:00 UTC</created_at>
67
+ <accepted_at type="datetime">2009/01/19 17:23:11 UTC</accepted_at>
68
+ <iteration>
69
+ <number>2</number>
70
+ <start type="datetime">2009/01/19 00:00:00 UTC</start>
71
+ <finish type="datetime">2009/01/26 00:00:00 UTC</finish>
72
+ </iteration>
73
+ </story>
74
+ <story>
75
+ <id type="integer">300939</id>
76
+ <story_type>feature</story_type>
77
+ <url>http://www.pivotaltracker.com/story/show/300939</url>
78
+ <estimate type="integer">1</estimate>
79
+ <current_state>started</current_state>
80
+ <description>Images need to be linked and modalbox needs testing in other browsers besides FF and Safari.</description>
81
+ <name>Finish modalbox implementation</name>
82
+ <requested_by>Brian Hogan</requested_by>
83
+ <owned_by>Brian Hogan</owned_by>
84
+ <created_at type="datetime">2008/12/04 02:33:33 UTC</created_at>
85
+ <iteration>
86
+ <number>28</number>
87
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
88
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
89
+ </iteration>
90
+ </story>
91
+ <story>
92
+ <id type="integer">300495</id>
93
+ <story_type>feature</story_type>
94
+ <url>http://www.pivotaltracker.com/story/show/300495</url>
95
+ <estimate type="integer">3</estimate>
96
+ <current_state>started</current_state>
97
+ <description>Choose an item, edit it, and notice that the dropdown for file / url is not selected on load, causing the file or url field to not display.</description>
98
+ <name>Editing an item does not select the correct type</name>
99
+ <requested_by>Brian Hogan</requested_by>
100
+ <owned_by>Brian Hogan</owned_by>
101
+ <created_at type="datetime">2008/12/04 01:55:39 UTC</created_at>
102
+ <iteration>
103
+ <number>28</number>
104
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
105
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
106
+ </iteration>
107
+ </story>
108
+ <story>
109
+ <id type="integer">300423</id>
110
+ <story_type>feature</story_type>
111
+ <url>http://www.pivotaltracker.com/story/show/300423</url>
112
+ <estimate type="integer">3</estimate>
113
+ <current_state>started</current_state>
114
+ <description>A profile should be viewable using the iPhone or Touch.
115
+ The profile page should link to the portfolios.
116
+ items should display within the portfolios.</description>
117
+ <name>iPhone interface for viewing profiles</name>
118
+ <requested_by>Brian Hogan</requested_by>
119
+ <owned_by>Brian Hogan</owned_by>
120
+ <created_at type="datetime">2008/12/04 01:48:53 UTC</created_at>
121
+ <iteration>
122
+ <number>28</number>
123
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
124
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
125
+ </iteration>
126
+ </story>
127
+ <story>
128
+ <id type="integer">300923</id>
129
+ <story_type>feature</story_type>
130
+ <url>http://www.pivotaltracker.com/story/show/300923</url>
131
+ <estimate type="integer">1</estimate>
132
+ <current_state>unstarted</current_state>
133
+ <description>Add a &quot;contact us&quot; form that sends an email</description>
134
+ <name>Contact Us form</name>
135
+ <requested_by>Brian Hogan</requested_by>
136
+ <created_at type="datetime">2008/12/04 02:14:51 UTC</created_at>
137
+ <iteration>
138
+ <number>28</number>
139
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
140
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
141
+ </iteration>
142
+ </story>
143
+ <story>
144
+ <id type="integer">300518</id>
145
+ <story_type>feature</story_type>
146
+ <url>http://www.pivotaltracker.com/story/show/300518</url>
147
+ <estimate type="integer">1</estimate>
148
+ <current_state>unstarted</current_state>
149
+ <description>Add a send to friend link on portfolios</description>
150
+ <name>Send To Friend linke</name>
151
+ <requested_by>Brian Hogan</requested_by>
152
+ <created_at type="datetime">2008/12/04 01:57:22 UTC</created_at>
153
+ <iteration>
154
+ <number>28</number>
155
+ <start type="datetime">2009/07/20 00:00:00 UTC</start>
156
+ <finish type="datetime">2009/07/27 00:00:00 UTC</finish>
157
+ </iteration>
158
+ </story>
159
+ <story>
160
+ <id type="integer">306550</id>
161
+ <story_type>feature</story_type>
162
+ <url>http://www.pivotaltracker.com/story/show/306550</url>
163
+ <estimate type="integer">1</estimate>
164
+ <current_state>unscheduled</current_state>
165
+ <description>&quot;less than one year&quot; looks kinda funny. Can we do months instead?</description>
166
+ <name>Show months for skills less than one year</name>
167
+ <requested_by>Brian Hogan</requested_by>
168
+ <created_at type="datetime">2008/12/09 17:28:40 UTC</created_at>
169
+ </story>
170
+ <story>
171
+ <id type="integer">300932</id>
172
+ <story_type>feature</story_type>
173
+ <url>http://www.pivotaltracker.com/story/show/300932</url>
174
+ <estimate type="integer">1</estimate>
175
+ <current_state>unscheduled</current_state>
176
+ <description></description>
177
+ <name>Add meta tags to pro accounts</name>
178
+ <requested_by>Brian Hogan</requested_by>
179
+ <created_at type="datetime">2008/12/04 02:22:36 UTC</created_at>
180
+ </story>
181
+ <story>
182
+ <id type="integer">300927</id>
183
+ <story_type>feature</story_type>
184
+ <url>http://www.pivotaltracker.com/story/show/300927</url>
185
+ <estimate type="integer">3</estimate>
186
+ <current_state>unscheduled</current_state>
187
+ <description>Allow people to buy an annual subscription for a pro account. use paypal for this first iteration. Payments should be $25 a year for pro accounts. Look into recurring billing.</description>
188
+ <name>Implement Pro account subscription</name>
189
+ <requested_by>Brian Hogan</requested_by>
190
+ <created_at type="datetime">2008/12/04 02:19:59 UTC</created_at>
191
+ </story>
192
+ <story>
193
+ <id type="integer">300924</id>
194
+ <story_type>feature</story_type>
195
+ <url>http://www.pivotaltracker.com/story/show/300924</url>
196
+ <estimate type="integer">1</estimate>
197
+ <current_state>unscheduled</current_state>
198
+ <description></description>
199
+ <name>Implement Exception Notification plugin</name>
200
+ <requested_by>Brian Hogan</requested_by>
201
+ <created_at type="datetime">2008/12/04 02:15:15 UTC</created_at>
202
+ </story>
203
+ <story>
204
+ <id type="integer">300800</id>
205
+ <story_type>feature</story_type>
206
+ <url>http://www.pivotaltracker.com/story/show/300800</url>
207
+ <estimate type="integer">3</estimate>
208
+ <current_state>unscheduled</current_state>
209
+ <description>Request recommendations from people. People receive an email asking for the recommendation. A link in the email takes them to a special URL where they enter a plain-text recommendation. They can also opt out of making the recommendation. Opting out reduces the skill score by 1000 points. Recommendations are worth 1000 points each.</description>
210
+ <name>Add Recommendations</name>
211
+ <requested_by>Brian Hogan</requested_by>
212
+ <created_at type="datetime">2008/12/04 02:14:16 UTC</created_at>
213
+ </story>
214
+ <story>
215
+ <id type="integer">300472</id>
216
+ <story_type>feature</story_type>
217
+ <url>http://www.pivotaltracker.com/story/show/300472</url>
218
+ <estimate type="integer">1</estimate>
219
+ <current_state>unscheduled</current_state>
220
+ <description>Web site thumbnails are coming from Thumbalizer. Should we make a method to fetch those images and store them locally? </description>
221
+ <name>Deal with web thumbnails</name>
222
+ <requested_by>Brian Hogan</requested_by>
223
+ <created_at type="datetime">2008/12/04 01:53:56 UTC</created_at>
224
+ </story>
225
+ </stories>}
226
+ url = "#{@service}/projects/4860/stories?token=#{@token}"
227
+ FakeWeb.register_uri(:get, url, :string => xml, :content_type => "application/xml", :status => ["200", "OK"])
228
+ @project = Pivotal::Project.new("id" => "4860", :name => "FeelMySkills")
229
+ end
230
+ it "should get stories" do
231
+ stories = Pivotal::Story.find_all_by_project_id(@project.id)
232
+ stories.each{|s| s.should be_a(Pivotal::Story)}
233
+ stories.detect{|s| s.name == "Deal with web thumbnails"}
234
+ stories.detect{|s| s.name == "Add Recommendations"}
235
+ stories.detect{|s| s.name == "Implement Exception Notification plugin"}
236
+ stories.detect{|s| s.name == "Implement Pro account subscription"}
237
+ stories.detect{|s| s.name == "iPhone interface for viewing profiles"}
238
+
239
+ end
240
+ end
241
+
242
+
243
+ end