public
Description: Radiant Comments
Clone URL: git://github.com/artofmission/radiant-comments.git
Got the tests passing.
ntalbott (author)
Fri May 23 08:41:27 -0700 2008
commit  5b429d3803c72e764133bf37d07f6157de09a216
tree    f063c34e0a9c96965c846ef76cdc20b4d83aaa44
parent  c89a61b05225dd90294ee31a8f3f145ea1822533
...
 
 
1
2
3
 
 
 
 
 
 
 
 
4
5
6
7
8
9
10
 
 
 
 
 
 
 
11
12
...
1
2
3
4
 
5
6
7
8
9
10
11
12
13
14
15
16
 
 
 
17
18
19
20
21
22
23
24
25
0
@@ -1,11 +1,24 @@
0
+require 'test/unit'
0
+# Load the environment
0
 unless defined? RADIANT_ROOT
0
   ENV["RAILS_ENV"] = "test"
0
- require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/boot"
0
+ case
0
+ when ENV["RADIANT_ENV_FILE"]
0
+ require ENV["RADIANT_ENV_FILE"]
0
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
0
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
0
+ else
0
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
0
+ end
0
 end
0
 require "#{RADIANT_ROOT}/test/test_helper"
0
 
0
 class Test::Unit::TestCase
0
- test_helper :extension_fixtures, :extension_tags
0
-
0
- self.fixture_path << File.dirname(__FILE__) + "/fixtures"
0
+ self.use_transactional_fixtures = true
0
+ self.use_instantiated_fixtures = false
0
+ self.fixture_path << File.expand_path(File.dirname(__FILE__)) + '/fixtures'
0
+end
0
+
0
+class ActionController::IntegrationTest < Test::Unit::TestCase
0
+ self.fixture_path = File.expand_path(File.dirname(__FILE__)) + '/fixtures'
0
 end
0
\ No newline at end of file
...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
...
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
6
7
...
23
24
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
0
@@ -2,30 +2,6 @@ require 'test/unit'
0
 require File.dirname(__FILE__) + '/../test_helper'
0
 
0
 class CommentTest < Test::Unit::TestCase
0
- # Replace this with your real tests.
0
-
0
- def setup
0
- @controller = Admin::CommentsController.new
0
- @request = ActionController::TestRequest.new
0
- @response = ActionController::TestResponse.new
0
- end
0
-
0
- def test_new_record_should_handle_http
0
- comment = Comment.new
0
- assert_equal "http://", comment.author_url
0
- end
0
-
0
- def test_should_remove_http_if_blank
0
-
0
- end
0
-
0
- def test_snippets_created
0
- #assert_not_nil Snippet.find_by_name("comments")
0
- #assert_not_nil Snippet.find_by_name("comment")
0
- #assert_not_nil Snippet.find_by_name("comment_form")
0
- end
0
-
0
-
0
   def test_valid_comment
0
     comment = Comment.new do |c|
0
       c.author = "Foo Bar"
0
@@ -47,27 +23,4 @@ class CommentTest < Test::Unit::TestCase
0
     assert_equal(comment.content, comment_stored.content)
0
   end
0
   
0
- def test_enable_comments
0
-
0
- page = Page.new do |p|
0
- p.title = "FOO"
0
- p.slug = "foo"
0
- p.breadcrumb = "FOO"
0
- p.class_name = "Page"
0
- end
0
-
0
- page.save
0
-
0
- assert !page.enable_comments
0
-
0
- post :enable, :page_id => page.id
0
-
0
- assert_response :success
0
-
0
- page = Page.find_by_title("FOO")
0
-
0
- assert page.enable_comments
0
-
0
- end
0
-
0
 end

Comments

    No one has commented yet.