Sha256: 0d446082c34c8e3303f5b250ce4147daa116f80df10dfe234b2da86548117c77
Contents?: true
Size: 582 Bytes
Versions: 10
Compression:
Stored size: 582 Bytes
Contents
module SpecSupport class Fixture def self.[](name) fixtures[name] end def self.[]=(name, value) fixtures[name] = value end def self.fixtures @fixtures ||= {} end def initialize(file, ext = :wsdl) self.file = file self.ext = ext end attr_accessor :file, :ext def filename "#{file}.#{ext}" end def path File.expand_path("spec/fixtures/#{filename}") end def read Fixture[filename] ||= File.read(path) end end def fixture(*args) Fixture.new(*args) end end
Version data entries
10 entries across 10 versions & 3 rubygems