initial commit

This commit is contained in:
Senad Uka
2017-09-24 10:12:44 +02:00
parent 05c9ffc3a3
commit 4a3349e500
125 changed files with 10992 additions and 0 deletions

View File

View File

@@ -0,0 +1,21 @@
require 'test_helper'
class RecipeTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
test "scraping should get all possible information" do
r = Recipe.new
r.original_url = "http://www.coolinarika.com/recept/burek-za-obraza/"
r.save!
r.scrape!
r.save!
assert_equal r.ingredients.length, 10
assert_not_nil r.name
assert_equal "Srednje zahtjevno", r.duration.to_s
assert r.ordinal >= 1, "Ordinal is not working!"
end
end