diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a56eec8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: elixir + +elixir: + - 1.2.2 diff --git a/test/readability/helper_test.exs b/test/readability/helper_test.exs index c25ba7b..d94d655 100644 --- a/test/readability/helper_test.exs +++ b/test/readability/helper_test.exs @@ -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 diff --git a/test/readability_test.exs b/test/readability_test.exs index 82af7c9..7408f16 100644 --- a/test/readability_test.exs +++ b/test/readability_test.exs @@ -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