Permalink
Browse files

Changed "threads" method name to "forum_threads" to avoid name conflict.

  • Loading branch information...
1 parent 08aeea9 commit c6fc52e5bf863536e9c7b3792cfeb35609af83f8 Norman Clarke committed Jan 5, 2009
Showing with 7 additions and 7 deletions.
  1. +5 −5 lib/disqus/forum.rb
  2. +2 −2 test/forum_test.rb
View
@@ -6,7 +6,7 @@ class Forum
def initialize(id, shortname, name, created_at, include_threads = false)
@id, @shortname, @name, @created_at = id.to_i, shortname, name, Time.parse(created_at.to_s)
@key = nil
- @threads = include_threads ? load_threads : []
+ @forum_threads = include_threads ? load_threads : []
end
def ==(other_forum)
@@ -42,11 +42,11 @@ def key(user_api_key = nil)
end
# Returns an array of threads belonging to this forum.
- def threads(force_update = false)
- if (@threads.nil? or @threads.empty? or force_update)
- @threads = Disqus::Thread.list(self)
+ def forum_threads(force_update = false)
+ if (@forum_threads.nil? or @forum_threads.empty? or force_update)
+ @forum_threads = Disqus::Thread.list(self)
end
- @threads
+ @forum_threads
end
# Returns a thread associated with the given URL.
View
@@ -40,10 +40,10 @@ def test_key
assert_equal "FAKE_FORUM_API_KEY", forum.key
end
- def test_threads
+ def test_forum_threads
forum = create_forum
Disqus::Thread.expects(:list).with(forum).returns([thread = mock()])
- assert_equal [thread], forum.threads
+ assert_equal [thread], forum.forum_threads
end
def test_get_thread_by_url

0 comments on commit c6fc52e

Please sign in to comment.