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

Version Path
wasabi-3.5.0 spec/support/fixture.rb
wasabi-3.4.0 spec/support/fixture.rb
wasabi-3.3.1 spec/support/fixture.rb
wasabi-3.3.0 spec/support/fixture.rb
wasabi_with_adapter-3.2.4 spec/support/fixture.rb
wasabi-3.2.3 spec/support/fixture.rb
wasabi-3.2.2 spec/support/fixture.rb
wasabi-3.2.1 spec/support/fixture.rb
wasabi-ng-1.6-3.3.0 spec/support/fixture.rb
wasabi-3.2.0 spec/support/fixture.rb