ubiquitously 0.0.1.6 → 0.1.0

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.
Files changed (114) hide show
  1. data/README.markdown +224 -19
  2. data/Rakefile +12 -4
  3. data/bin/u.me +4 -0
  4. data/lib/ubiquitously.rb +56 -7
  5. data/lib/ubiquitously/commands/base.rb +118 -0
  6. data/lib/ubiquitously/commands/post.rb +108 -0
  7. data/lib/ubiquitously/commands/user.rb +111 -0
  8. data/lib/ubiquitously/extensions/callbacks.rb +62 -0
  9. data/lib/ubiquitously/extensions/core.rb +88 -0
  10. data/lib/ubiquitously/extensions/mechanize.rb +35 -0
  11. data/lib/ubiquitously/models/base.rb +18 -0
  12. data/lib/ubiquitously/models/page.rb +28 -0
  13. data/lib/ubiquitously/models/post.rb +66 -0
  14. data/lib/ubiquitously/models/service.rb +1 -0
  15. data/lib/ubiquitously/models/service/account.rb +57 -0
  16. data/lib/ubiquitously/models/service/account/authorizable.rb +58 -0
  17. data/lib/ubiquitously/models/service/account/loggable.rb +50 -0
  18. data/lib/ubiquitously/models/service/account/restful.rb +21 -0
  19. data/lib/ubiquitously/models/service/post.rb +59 -0
  20. data/lib/ubiquitously/models/service/post/loggable.rb +64 -0
  21. data/lib/ubiquitously/models/service/post/ownable.rb +31 -0
  22. data/lib/ubiquitously/models/service/post/postable.rb +73 -0
  23. data/lib/ubiquitously/models/service/post/restful.rb +52 -0
  24. data/lib/ubiquitously/models/user.rb +128 -0
  25. data/lib/ubiquitously/services/blogger_den.rb +68 -0
  26. data/lib/ubiquitously/services/chetzit.rb +37 -0
  27. data/lib/ubiquitously/services/code_project.rb +21 -0
  28. data/lib/ubiquitously/services/delicious.rb +54 -0
  29. data/lib/ubiquitously/services/design_bump.rb +41 -0
  30. data/lib/ubiquitously/services/designgizer.rb +21 -0
  31. data/lib/ubiquitously/services/designr_fix.rb +21 -0
  32. data/lib/ubiquitously/services/digg.rb +151 -0
  33. data/lib/ubiquitously/services/digzign.rb +25 -0
  34. data/lib/ubiquitously/services/diigo.rb +68 -0
  35. data/lib/ubiquitously/services/dzone.rb +132 -0
  36. data/lib/ubiquitously/services/dzone_snippets.rb +39 -0
  37. data/lib/ubiquitously/services/facebook.rb +42 -0
  38. data/lib/ubiquitously/services/faves.rb +81 -0
  39. data/lib/ubiquitously/services/favshare.rb +78 -0
  40. data/lib/ubiquitously/services/flikode.rb +38 -0
  41. data/lib/ubiquitously/services/friendfeed.rb +21 -0
  42. data/lib/ubiquitously/services/gist.rb +52 -0
  43. data/lib/ubiquitously/services/google_buzz.rb +15 -0
  44. data/lib/ubiquitously/services/identica.rb +15 -0
  45. data/lib/ubiquitously/services/jump_tags.rb +21 -0
  46. data/lib/ubiquitously/services/kailoon.rb +27 -0
  47. data/lib/ubiquitously/services/meta_filter.rb +26 -0
  48. data/lib/ubiquitously/services/mixx.rb +94 -0
  49. data/lib/ubiquitously/services/mmo.rb +22 -0
  50. data/lib/ubiquitously/services/mvc_forge.rb +37 -0
  51. data/lib/ubiquitously/services/my_space.rb +25 -0
  52. data/lib/ubiquitously/services/nestdev.rb +36 -0
  53. data/lib/ubiquitously/services/newsvine.rb +76 -0
  54. data/lib/ubiquitously/services/pixel_groovy.rb +22 -0
  55. data/lib/ubiquitously/services/posterous.rb +24 -0
  56. data/lib/ubiquitously/services/programmers_heaven.rb +21 -0
  57. data/lib/ubiquitously/{propeller.rb → services/propeller.rb} +17 -26
  58. data/lib/ubiquitously/services/queness.rb +38 -0
  59. data/lib/ubiquitously/services/reddit.rb +62 -0
  60. data/lib/ubiquitously/services/scribd.rb +21 -0
  61. data/lib/ubiquitously/services/script_and_style.rb +23 -0
  62. data/lib/ubiquitously/services/sharebrain.rb +19 -0
  63. data/lib/ubiquitously/services/shoutwire.rb +34 -0
  64. data/lib/ubiquitously/services/slideshare.rb +70 -0
  65. data/lib/ubiquitously/services/smipple.rb +21 -0
  66. data/lib/ubiquitously/services/snipplr.rb +67 -0
  67. data/lib/ubiquitously/services/snipt.rb +49 -0
  68. data/lib/ubiquitously/services/sphinn.rb +24 -0
  69. data/lib/ubiquitously/services/stumble_upon.rb +67 -0
  70. data/lib/ubiquitously/services/stumpedia.rb +13 -0
  71. data/lib/ubiquitously/services/tumblr.rb +28 -0
  72. data/lib/ubiquitously/services/tweako.rb +53 -0
  73. data/lib/ubiquitously/services/twitter.rb +60 -0
  74. data/lib/ubiquitously/services/web_blend.rb +25 -0
  75. data/lib/ubiquitously/services/webdev5.rb +32 -0
  76. data/lib/ubiquitously/services/who_freelance.rb +21 -0
  77. data/lib/ubiquitously/services/wordtaps.rb +36 -0
  78. data/lib/ubiquitously/services/yahoo_buzz.rb +64 -0
  79. data/lib/ubiquitously/services/youblr.rb +15 -0
  80. data/lib/ubiquitously/services/zabox.rb +22 -0
  81. data/lib/ubiquitously/support/active_record.rb +25 -0
  82. data/lib/ubiquitously/support/storage.rb +71 -0
  83. data/test/config/cookies.yml +111 -0
  84. data/test/config/credentials.yml +7 -0
  85. data/test/config/secrets.yml +33 -0
  86. data/test/config/tokens.yml +30 -0
  87. data/test/meta.html +19 -0
  88. data/test/test_delicious.rb +37 -0
  89. data/test/test_digg.rb +57 -0
  90. data/test/test_dzone.rb +23 -18
  91. data/test/test_facebook.rb +40 -0
  92. data/test/test_faves.rb +18 -20
  93. data/test/test_helper.rb +8 -1
  94. data/test/test_newsvine.rb +3 -3
  95. data/test/test_page.rb +21 -0
  96. data/test/test_post.rb +55 -0
  97. data/test/test_propeller.rb +2 -2
  98. data/test/test_reddit.rb +26 -4
  99. data/test/test_stumble_upon.rb +23 -3
  100. data/test/test_twitter.rb +33 -0
  101. data/test/test_user.rb +22 -0
  102. metadata +199 -24
  103. data/lib/ext.rb +0 -37
  104. data/lib/ubiquitously/base.rb +0 -56
  105. data/lib/ubiquitously/dzone.rb +0 -111
  106. data/lib/ubiquitously/faves.rb +0 -43
  107. data/lib/ubiquitously/mister_wong.rb +0 -11
  108. data/lib/ubiquitously/mixins/resourceful.rb +0 -50
  109. data/lib/ubiquitously/mixx.rb +0 -66
  110. data/lib/ubiquitously/newsvine.rb +0 -54
  111. data/lib/ubiquitously/reddit.rb +0 -46
  112. data/lib/ubiquitously/sphinn.rb +0 -11
  113. data/lib/ubiquitously/stumble_upon.rb +0 -61
  114. data/test/config.yml +0 -18
@@ -0,0 +1,7 @@
1
+ ---
2
+ faves: {}
3
+
4
+ twitter:
5
+ token: 17794723-t1pNMc7f2M1bvDiSeH78Hzdwn3YLLvJP8vbHVSi0
6
+ secret: ZsyGTTRt7WtvVEgx2tqF6PzL2s8CXwjbByzACfhQ0
7
+ key: "17794723"
@@ -0,0 +1,33 @@
1
+ dzone:
2
+ key: viatropos
3
+ secret: "w!sd0m[:227]"
4
+ reddit:
5
+ key: viatropos
6
+ secret: "w!sd0m[:227]"
7
+ stumble_upon:
8
+ key: viatropos
9
+ secret: "tarq1986"
10
+ faves:
11
+ key: viatropos
12
+ secret: tarq1986
13
+ newsvine:
14
+ key: viatropos
15
+ secret: tarq1986
16
+ propeller:
17
+ key: viatropos
18
+ secret: tarq1986
19
+ delicious:
20
+ key: viatropos
21
+ secret: "w!sd0m[:227]"
22
+ digg:
23
+ key: viatropos
24
+ secret: tarq1986
25
+ diigo:
26
+ key: viatropos
27
+ secret: tarq1986
28
+ facebook:
29
+ key: "lancejpollard@gmail.com"
30
+ secret: growandchange
31
+ twitter:
32
+ key: viatropos
33
+ secret: "w!sd0m[:227]"
@@ -0,0 +1,30 @@
1
+ connect:
2
+ twitter:
3
+ key: "1Vpei1j8mXcleMHxvGO5uQ"
4
+ secret: "hKPalfQZ2scNQM5pB7D8Q7jCIeTkBftg7HWPt3XElWs"
5
+ facebook:
6
+ key: "306987525268"
7
+ secret: "8fb39aa4fa807aadc37e964061347740"
8
+ options:
9
+ scope: "email, offline_access, publish_stream"
10
+ google:
11
+ key: "www.accd.org"
12
+ secret: "DkXmX6bXe4aDEMEVeOfLYrYo"
13
+ yahoo:
14
+ key: "dj0yJmk9WVBkZFN1Y1dwZ09zJmQ9WVdrOWRISm5PRkZUTjJVbWNHbzlNVGswTURBNU1UWTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1mNQ--"
15
+ secret: "b04421eefc7424da56f5a2c529152c4c7188052c"
16
+ myspace:
17
+ key: "d4bf40761fac415b987bc309e91ec3ed"
18
+ secret: "af9dae46f6554da3828016ecf226ba3953edcd0047954ea9b2a1ca0917d5a943"
19
+ vimeo:
20
+ key: "ed7ba91182b0cc3292f3094b0d494aa1"
21
+ secret: "d21a5453e2a68bb"
22
+ linked_in:
23
+ key: "WPJ0TzP4UqaDc5pR2_mvLbu9D61awyKzpBeZ3zHoT9j7XOMdDcQ5uuUIPgXqK4RW"
24
+ secret: "dFs28hf-XzrSTeJjoJ9eRxdV5XNjmeQEZKwQs398Z48BAzMHhlhcKzP9jFHEF--b"
25
+ netflix:
26
+ key: ""
27
+ secret: ""
28
+ github:
29
+ key: "a5a3807f345f5bbb90bb"
30
+ secret: "42648708d07b2c30df1e89323e6e5a32c971543d"
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <html dir='ltr' lang='en-US' xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://opengraphprotocol.org/schema/' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head profile='http://gmpg.org/xfn/11'>
4
+ <!-- meta -->
5
+ <title>Viatropos</title>
6
+ <meta content="text/html; charset=UTF-8" name="Content-Type" />
7
+ <meta content="Creativity and Emergence. A personal blog about writing code that the world can leverage." name="description" />
8
+ <meta content="jquery, html 5, css3, ajax, ruby-on-rails, ruby-on-rails-developer, ruby-on-rails-examples, rails-deployment, flex, actionscript, flash, open-source" name="keywords" />
9
+ <meta content="index follow" name="robots" />
10
+ <meta content="Viatropos - Lance Pollard" name="author" />
11
+ <meta content="Viatropos | All Rights Reserved" name="copyright" />
12
+ <meta content="United States" name="country" />
13
+ <link href='http://i.imgur.com/gpRNG.jpg' rel='image_src' />
14
+ </head>
15
+ <body>
16
+ <div class='document' role='document'>
17
+ </div>
18
+ </body>
19
+ </html>
@@ -0,0 +1,37 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ module Ubiquitously
4
+ class DeliciousTest < ActiveSupport::TestCase
5
+
6
+ context "Delicious::Post" do
7
+ setup do
8
+ create_user
9
+ @post = Ubiquitously::Delicious::Post.new(
10
+ :user => @user,
11
+ :url => "http://github.com",
12
+ :title => "Github",
13
+ :description => "Place to host your code",
14
+ :tags => ["code", "git"]
15
+ )
16
+ end
17
+
18
+ should "find all delicious posts" do
19
+ puts @post.save.inspect
20
+ assert true
21
+ end
22
+ =begin
23
+ should "create a post" do
24
+ # http://www.Delicious.com/links/buttons.jsp
25
+ assert Ubiquitously::Delicious::Post.create(
26
+ :debug => true,
27
+ :title => "A Title",
28
+ :description => "A Description",
29
+ :tags => ["usability", "ruby", "web services", "open source"],
30
+ :url => "http://example.com/abcdef",
31
+ :user => Ubiquitously::Delicious::Account.new
32
+ )
33
+ end
34
+ =end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,57 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ module Ubiquitously
4
+ class DiggTest < ActiveSupport::TestCase
5
+ =begin
6
+ context "Digg::Account" do
7
+ setup do
8
+ @user = Ubiquitously::Digg::Account.new
9
+ end
10
+
11
+ context "login" do
12
+ should "raise informative error if invalid password" do
13
+ @user.password = "bad password"
14
+ assert_raises(Ubiquitously::AuthenticationError) do
15
+ @user.login
16
+ end
17
+ end
18
+
19
+ should "login successfully if valid credentials" do
20
+ assert_equal true, @user.login
21
+ end
22
+ end
23
+ end
24
+ =end
25
+ context "Digg::Post" do
26
+ setup do
27
+ @user = Ubiquitously::User.new(
28
+ :username => "viatropos",
29
+ :cookies_path => "test/cookies.yml"
30
+ )
31
+
32
+ @title = "Viatropos"
33
+ @description = "Creativity and Emergence. A personal blog about writing code that the world can leverage."
34
+ @tags = %w(jquery html-5 css3 ajax ruby-on-rails ruby-on-rails-developer ruby-on-rails-examples rails-deployment flex actionscript flash open-source)
35
+
36
+ @post = Ubiquitously::Post.new(
37
+ :url => "./test/meta.html",
38
+ :title => @title,
39
+ :description => @description,
40
+ :tags => @tags,
41
+ :user => @user
42
+ )
43
+ end
44
+
45
+ should "find pre-existent post on digg" do
46
+ @post.url = "http://google.com"
47
+ result = @post.new_record?(:digg)
48
+ assert result
49
+ end
50
+
51
+ should "create a post" do
52
+ @post.url = "http://apple.com"
53
+ assert @post.save(:digg)
54
+ end
55
+ end
56
+ end
57
+ end
@@ -2,9 +2,10 @@ require File.dirname(__FILE__) + '/test_helper.rb'
2
2
 
3
3
  module Ubiquitously
4
4
  class DzoneTest < ActiveSupport::TestCase
5
- context "Dzone::User" do
5
+ =begin
6
+ context "Dzone::Account" do
6
7
  setup do
7
- @user = Ubiquitously::Dzone::User.new
8
+ @user = Ubiquitously::Dzone::Account.new
8
9
  end
9
10
 
10
11
  context "login" do
@@ -16,27 +17,31 @@ module Ubiquitously
16
17
  end
17
18
  end
18
19
  end
19
-
20
+ =end
20
21
  context "Dzone::Post" do
21
22
  setup do
22
- @post = Ubiquitously::Dzone::Post.new
23
- end
24
-
25
- should "raise error if post exists already" do
26
- assert_raises(Ubiquitously::DuplicateError) do
27
- Ubiquitously::Dzone::Post.new_record?("http://www.google.com", true)
28
- end
23
+ @user = Ubiquitously::User.new(
24
+ :username => "viatropos",
25
+ :cookies_path => "test/cookies.yml"
26
+ )
27
+
28
+ @title = "Using Redis on Heroku"
29
+ @description = "The only javascript framework you'll need. Well, if you need Object Oriented JS, you'll have to do a little initial setup."
30
+ @tags = %w(javascript, frameworks, jquery)
31
+
32
+ @post = Ubiquitously::Post.new(
33
+ :url => "./test/meta.html",
34
+ :title => @title,
35
+ :description => @description,
36
+ :tags => @tags,
37
+ :categories => ["web-design"],
38
+ :user => @user
39
+ )
29
40
  end
30
41
 
31
42
  should "create a post" do
32
- # http://www.dzone.com/links/buttons.jsp
33
- assert Ubiquitously::Dzone::Post.create(
34
- :debug => true,
35
- :title => "A Title",
36
- :description => "A Description",
37
- :tags => ["usability", "ruby", "web services", "open source"],
38
- :url => "http://example.com/abcdef"
39
- )
43
+ @post.url = "http://www.zhione.com/security/understanding-network-security-in-plain-english/"
44
+ assert @post.save(:dzone)
40
45
  end
41
46
  end
42
47
  end
@@ -0,0 +1,40 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ module Ubiquitously
4
+ class FacebookTest < ActiveSupport::TestCase
5
+ context "Facebook::Account" do
6
+ setup do
7
+ create_user(:storage => "test/config")
8
+ end
9
+
10
+ context "login" do
11
+ should "login successfully if valid credentials" do
12
+ assert_equal true, @user.login(:facebook)
13
+ end
14
+ end
15
+ end
16
+
17
+ context "Facebook::Post" do
18
+ setup do
19
+ create_user(:storage => "test/config")
20
+
21
+ @title = "Viatropos"
22
+ @description = "Facebook posting ubiquitously"
23
+ @tags = %w(ubiquitous)
24
+
25
+ @post = Ubiquitously::Post.new(
26
+ :url => "./test/meta.html",
27
+ :title => @title,
28
+ :description => @description,
29
+ :tags => @tags,
30
+ :user => @user
31
+ )
32
+ end
33
+
34
+ should "create a post" do
35
+ assert @post.save(:facebook)
36
+ end
37
+ end
38
+
39
+ end
40
+ end
@@ -1,42 +1,40 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
- require 'restclient'
2
+
3
3
  module Ubiquitously
4
4
  class FavesTest < ActiveSupport::TestCase
5
- context "Faves::User" do
5
+ context "Faves::Account" do
6
6
  setup do
7
- @user = Ubiquitously::Faves::User.new
7
+ create_user(:storage => "test/config")
8
8
  end
9
9
 
10
10
  context "login" do
11
- should "raise informative error if invalid password" do
12
- @user.password = "bad password"
13
- assert_raises(Ubiquitously::AuthenticationError) do
14
- @user.login
15
- end
16
- end
17
11
 
18
12
  should "login successfully if valid credentials" do
19
- assert_equal true, @user.login
13
+ assert_equal true, @user.login(:faves)
20
14
  end
21
15
  end
22
16
  end
23
- =begin
24
17
  context "Faves::Post" do
25
18
  setup do
26
- @post = Ubiquitously::Faves::Post.new(
27
- :debug => true,
28
- :title => "A Title",
29
- :description => "A Description",
30
- :tags => ["usability", "ruby", "web services", "open source"],
31
- :url => "http://example.com/abcdef",
32
- :user => Ubiquitously::Faves::User.new
19
+ create_user(:storage => "test/config")
20
+
21
+ @title = "Viatropos"
22
+ @description = "Mechanically logging in"
23
+ @tags = %w(ubiquitous)
24
+
25
+ @post = Ubiquitously::Post.new(
26
+ :url => "http://twitter.com/",
27
+ :title => @title,
28
+ :description => @description,
29
+ :tags => @tags,
30
+ :user => @user
33
31
  )
34
32
  end
35
33
 
36
34
  should "create a post" do
37
- assert @post.save
35
+ assert @post.save(:faves)
38
36
  end
39
37
  end
40
- =end
38
+
41
39
  end
42
40
  end
@@ -10,4 +10,11 @@ require 'rr'
10
10
 
11
11
  require File.dirname(__FILE__) + '/../lib/ubiquitously'
12
12
 
13
- Ubiquitously.configure("test/config.yml")
13
+ Ubiquitously.configure("test/config/secrets.yml")
14
+ Passport.configure("test/config/tokens.yml")
15
+
16
+ ActiveSupport::TestCase.class_eval do
17
+ def create_user(options)
18
+ @user = Ubiquitously::User.new(options.merge(:username => "viatropos"))
19
+ end
20
+ end
@@ -2,9 +2,9 @@ require File.dirname(__FILE__) + '/test_helper.rb'
2
2
 
3
3
  module Ubiquitously
4
4
  class NewsvineTest < ActiveSupport::TestCase
5
- context "Newsvine::User" do
5
+ context "Newsvine::Account" do
6
6
  setup do
7
- @user = Ubiquitously::Newsvine::User.new
7
+ @user = Ubiquitously::Newsvine::Account.new
8
8
  end
9
9
 
10
10
  context "login" do
@@ -30,7 +30,7 @@ module Ubiquitously
30
30
  :description => "A Description",
31
31
  :tags => ["usability", "ruby", "web services", "open source"],
32
32
  :url => "http://example.com/abcdef",
33
- :user => Ubiquitously::Newsvine::User.new
33
+ :user => Ubiquitously::Newsvine::Account.new
34
34
  )
35
35
  end
36
36
 
@@ -0,0 +1,21 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ module Ubiquitously
4
+ class PageTest < ActiveSupport::TestCase
5
+ context "Page" do
6
+ setup do
7
+ @page = Ubiquitously::Page.new(:url => "./test/meta.html")
8
+ @title = "Viatropos"
9
+ @description = "Creativity and Emergence. A personal blog about writing code that the world can leverage."
10
+ @tags = %w(jquery html-5 css3 ajax ruby-on-rails ruby-on-rails-developer ruby-on-rails-examples rails-deployment flex actionscript flash open-source)
11
+ end
12
+
13
+ should "parse the page" do
14
+ @page.parse
15
+ assert_equal @title, @page.title
16
+ assert_equal @description, @page.description
17
+ assert_equal @tags, @page.tags
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,55 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ module Ubiquitously
4
+ class PostTest < ActiveSupport::TestCase
5
+ context "Post" do
6
+ setup do
7
+ @user = Ubiquitously::User.new(
8
+ :username => "viatropos",
9
+ :cookies_path => "test/cookies.yml"
10
+ )
11
+
12
+ @title = "Viatropos"
13
+ @description = "Creativity and Emergence. A personal blog about writing code that the world can leverage."
14
+ @tags = %w(jquery html-5 css3 ajax ruby-on-rails ruby-on-rails-developer ruby-on-rails-examples rails-deployment flex actionscript flash open-source)
15
+
16
+ @post = Ubiquitously::Post.new(
17
+ :url => "./test/meta.html",
18
+ :title => @title,
19
+ :description => @description,
20
+ :tags => @tags,
21
+ :user => @user
22
+ )
23
+ end
24
+
25
+ should "parse the page" do
26
+ @page = @post.page
27
+ assert_equal @title, @page.title
28
+ assert_equal @description, @page.description
29
+ assert_equal @tags, @page.tags
30
+ end
31
+
32
+ should "respond to dynamic methods" do
33
+ assert_equal true, @post.respond_to?(:dzone?)
34
+ assert_equal true, @post.respond_to?(:digg?)
35
+ end
36
+
37
+ should "dynamically create post service objects" do
38
+ assert_kind_of Ubiquitously::Dzone::Post, @post.dzone
39
+ assert_equal true, @post.dzone.new_record?
40
+ assert_equal false, @post.dzone? # it's a new record
41
+ end
42
+
43
+ should "be able to create the post" do
44
+ @post.faves.save(:debug => true)
45
+ assert @post.faves.valid?
46
+ end
47
+
48
+ should "be able to find posts" do
49
+ result = @post.faves.find
50
+ assert result
51
+ assert @post.faves.new_record?
52
+ end
53
+ end
54
+ end
55
+ end