google_alerts 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module GoogleAlerts
2
2
 
3
- def parse_email(html)
3
+ def self.parse_email(html)
4
4
  GoogleAlerts::Email.new(html).results
5
5
  end
6
6
 
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe GoogleAlerts do
4
+
5
+ it "parses search results out of an email" do
6
+ html = stub(:html)
7
+ results = stub(:results)
8
+
9
+ alert = stub(:alert, results: results)
10
+ GoogleAlerts::Email.stub(:new).with(html).and_return(alert)
11
+
12
+ GoogleAlerts.parse_email(html).should == results
13
+ end
14
+
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_alerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -74,6 +74,7 @@ files:
74
74
  - spec/fixtures/direct_google_alert.html
75
75
  - spec/fixtures/forwarded_google_alert.html
76
76
  - spec/lib/google_alerts/email_spec.rb
77
+ - spec/lib/google_alerts_spec.rb
77
78
  - spec/spec_helper.rb
78
79
  homepage: http://mattgillooly.github.com/google_alerts
79
80
  licenses: []
@@ -103,4 +104,5 @@ test_files:
103
104
  - spec/fixtures/direct_google_alert.html
104
105
  - spec/fixtures/forwarded_google_alert.html
105
106
  - spec/lib/google_alerts/email_spec.rb
107
+ - spec/lib/google_alerts_spec.rb
106
108
  - spec/spec_helper.rb