require 'spec_helper' describe Nutmeg::TagTreeHelper do before(:each) do @tree_from_yaml = Nutmeg::TreeFromYaml.new({file: [Dir.pwd, "/spec/files/tree.yml"].join}) end describe "#print_html" do it "outputs html" do expect(Nutmeg::TagTreeHelper.new(@tree_from_yaml.tree).print_html([1]).class).to eq(String) expect(Nutmeg::TagTreeHelper.new(@tree_from_yaml.tree).print_html(["north", "men", "collections", "summer_2015"])).to eq("") end it "outputs html for subtree" do subtree = @tree_from_yaml.tree.subtree("north") expect(Nutmeg::TagTreeHelper.new(subtree).print_html(["men", "collections", "summer_2015"])).to eq("") end end end