lib/serverspec/matcher/be_installed.rb in serverspec-2.30.0 vs lib/serverspec/matcher/be_installed.rb in serverspec-2.30.1

- old
+ new

@@ -1,7 +1,18 @@ RSpec::Matchers.define :be_installed do match do |name| - name.installed?(@provider, @version) + if subject.class.name == 'Serverspec::Type::SelinuxModule' + name.installed?(@version) + else + name.installed?(@provider, @version) + end + end + + description do + message = 'be installed' + message << %( by "#{@provider}") if @provider + message << %( with version "#{@version}") if @version + message end chain :by do |provider| @provider = provider end