Sha256: a163fd3eabaf9fa4ed64cebf409078babf6625035c4a347291c3504044fd4d53

Contents?: true

Size: 440 Bytes

Versions: 1

Compression:

Stored size: 440 Bytes

Contents

module HtmlSpec
  class << self
    attr_accessor :always_use_server

    def html
      @html ||= File.expand_path("../../data/html", __FILE__)
    end

    def url_for(str, opts = {})
      if opts[:needs_server] || always_use_server
        File.join(host, str)
      else
        File.join(files, str)
      end
    end

    def files
      @files ||= "file://#{html}"
    end

    def host
      @host ||= "http://"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_module-0.1.8 spec/support/html_spec.rb