File: have_virtual_dir.rb

package info (click to toggle)
ruby-serverspec 2.43.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 984 kB
  • sloc: ruby: 4,847; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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