require_relative "./helper" describe OcticonsHelper do describe "rendering" do it "renders nothing when no symbol is passed in" do assert_equal "", octicon(nil) end it "renders the svg" do assert_match /.*<\/svg>/, octicon("x") end it "has a path" do assert_match / 1 "foo" end def mock.options; end Octicons::Octicon.stub :new, mock do octicon("alert") octicon("alert") end OcticonsHelper.octicons_helper_cache = {} end end end