File: be_mounted.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 (15 lines) | stat: -rw-r--r-- 259 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
RSpec::Matchers.define :be_mounted do
  match do |path|
    path.mounted?(@attr, @only_with)
  end

  chain :with do |attr|
    @attr      = attr
    @only_with = false
  end

  chain :only_with do |attr|
    @attr      = attr
    @only_with = true
  end
end