remote_partial 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/remote_partial/resource_manager.rb +6 -4
- data/lib/remote_partial/version.rb +16 -7
- data/test/dummy/app/views/remote_partials/_clock.html.erb +1 -1
- data/test/dummy/app/views/remote_partials/_wcc.html.erb +277 -338
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +524 -0
- data/test/unit/remote_partial/resource_manager_test.rb +6 -2
- metadata +1 -1
@@ -32,7 +32,7 @@ module RemotePartial
|
|
32
32
|
|
33
33
|
def test_html
|
34
34
|
resource_manager = ResourceManager.new(@url)
|
35
|
-
assert_equal
|
35
|
+
assert_equal raw_content, resource_manager.html
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_html_with_limit
|
@@ -66,8 +66,12 @@ module RemotePartial
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
def raw_content
|
70
|
+
Net::HTTP.get(URI(@url))
|
71
|
+
end
|
72
|
+
|
69
73
|
def content
|
70
|
-
Nokogiri::HTML(
|
74
|
+
Nokogiri::HTML(raw_content)
|
71
75
|
end
|
72
76
|
|
73
77
|
|