serverspec/serverspec

View on GitHub
lib/serverspec/matcher/have_virtual_dir.rb

Summary

Maintainability
A
0 mins
Test Coverage
RSpec::Matchers.define :have_virtual_dir do |vdir|
  match do |subject|
    if subject.class.name == 'Serverspec::Type::IisWebsite'
      subject.has_virtual_dir?(vdir, @path)
    else
      className = subject.class.name
      raise "not supported class #{className}"
    end
  end

  chain :with_path do |path|
    @path = path
  end
end