lib/serverspec/matchers/be_mounted.rb in serverspec-0.4.0 vs lib/serverspec/matchers/be_mounted.rb in serverspec-0.4.1
- old
+ new
@@ -1,7 +1,11 @@
RSpec::Matchers.define :be_mounted do
match do |path|
- backend.check_mounted(example, path, @attr, @only_with)
+ if path.respond_to?(:mounted?)
+ path.mounted?(@attr, @only_with)
+ else
+ backend.check_mounted(example, path, @attr, @only_with)
+ end
end
chain :with do |attr|
@attr = attr
@only_with = false
end