Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
Added back some accidentally omitted files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Clarke committed Sep 3, 2008
1 parent 461f4de commit f12d997
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/disqus/view_helpers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module Disqus

module ViewHelpers

def disqus_thread(options = {})
Disqus::Widget::thread(options)
end

def disqus_comment_counts(options = {})
Disqus::Widget::comment_counts(options)
end

def disqus_top_commenters(options = {})
Disqus::Widget::top_commenters(options)
end

def disqus_popular_threads(options = {})
Disqus::Widget::popular_threads(options)
end

def disqus_recent_comments(options = {})
Disqus::Widget::recent_comments(options)
end

def disqus_combo(options = {})
Disqus::Widget::combo(options)
end

end

end
37 changes: 37 additions & 0 deletions test/view_helpers_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require 'test/unit'
require 'disqus'
require 'disqus/view_helpers'

class ViewHelpersTest < Test::Unit::TestCase

include Disqus::ViewHelpers

def setup
Disqus::defaults[:account] = "tests"
end

def test_disqus_thread
assert disqus_thread
end

def test_disqus_comment_counts
assert disqus_comment_counts
end

def test_disqus_top_commenters
assert disqus_top_commenters
end

def test_disqus_popular_threads
assert disqus_popular_threads
end

def test_disqus_recent_comments
assert disqus_recent_comments
end

def test_disqus_combo
assert disqus_combo
end

end

0 comments on commit f12d997

Please sign in to comment.