test/helper.rb in chupa-text-1.0.5 vs test/helper.rb in chupa-text-1.0.6

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com> +# Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. @@ -14,12 +14,18 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA require "pathname" require "tempfile" +require "uri" module Helper def fixture_path(*components) base_path = Pathname(__FILE__).dirname + "fixture" base_path.join(*components) + end + + def fixture_uri(*components) + path = fixture_path(*components) + URI.parse("file://#{path}") end end