polleverywhere 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -203,7 +203,7 @@ module PollEverywhere # :nodoc
203
203
  def results
204
204
  if persisted?
205
205
  http.get.to(path + '/results').response do |response|
206
- return true
206
+ return response.body
207
207
  end
208
208
 
209
209
  return false
@@ -1,3 +1,3 @@
1
1
  module PollEverywhere
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -72,6 +72,14 @@ describe "API" do
72
72
  end
73
73
  end
74
74
 
75
+ it "should retrieve results" do
76
+ @mcp.save
77
+
78
+ lambda {
79
+ JSON.parse @mcp.results
80
+ }.should_not raise_error JSON::ParserError
81
+ end
82
+
75
83
  it "should clear results" do
76
84
  @mcp.save
77
85
  @mcp.clear.should be_true
@@ -135,6 +143,14 @@ describe "API" do
135
143
  end
136
144
  end
137
145
 
146
+ it "should retrieve results" do
147
+ @ftp.save
148
+
149
+ lambda {
150
+ JSON.parse @ftp.results
151
+ }.should_not raise_error JSON::ParserError
152
+ end
153
+
138
154
  it "should clear results" do
139
155
  @ftp.save
140
156
  @ftp.clear.should be_true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polleverywhere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-18 00:00:00.000000000 Z
12
+ date: 2013-04-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json