Sha256: 86b3dafd38bb0514d3d5f9cec050c9ba15253838cc8846e08f81d576efe45847
Contents?: true
Size: 611 Bytes
Versions: 6
Compression:
Stored size: 611 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 module Methods def fixture(*args) Fixture.new(*args) end end end
Version data entries
6 entries across 6 versions & 1 rubygems