add .travis.yml
This commit is contained in:
parent
c122c74735
commit
f69365c4a4
|
@ -0,0 +1,4 @@
|
|||
language: elixir
|
||||
|
||||
elixir:
|
||||
- 1.2.2
|
|
@ -21,12 +21,12 @@ defmodule Readability.HelperTest do
|
|||
"""
|
||||
|
||||
setup do
|
||||
html_tree = Readability.parse(@sample)
|
||||
html_tree = Floki.parse(@sample)
|
||||
{:ok, html_tree: html_tree}
|
||||
end
|
||||
|
||||
test "change font tag to span", %{html_tree: html_tree} do
|
||||
expectred = @sample |> String.replace(~r/font/, "span") |> parse
|
||||
expectred = @sample |> String.replace(~r/font/, "span") |> Floki.parse
|
||||
result = Helper.change_tag(html_tree, "font", "span")
|
||||
assert result == expectred
|
||||
end
|
||||
|
|
|
@ -24,11 +24,11 @@ defmodule ReadabilityTest do
|
|||
|
||||
test "readability for medium" do
|
||||
%{status_code: 200, body: body} = HTTPoison.get!("https://medium.com/@kenmazaika/why-im-betting-on-elixir-7c8f847b58#.d0xmzfd15")
|
||||
IO.inspect Readability.content(body) |> Readability.readabl_text
|
||||
Readability.content(body) |> Readability.readabl_text
|
||||
end
|
||||
|
||||
test "readability for buzzfeed" do
|
||||
%{status_code: 200, body: body} = HTTPoison.get!("http://www.buzzfeed.com/salvadorhernandez/fbi-obtains-passcode-to-iphone-in-new-york-drops-case-agains#.koMMa21lj8")
|
||||
IO.inspect Readability.content(body) |> Readability.readabl_text
|
||||
Readability.content(body) |> Readability.readabl_text
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue