Sha256: ec82043789bfe069e0b81546addf11c1dfcc43c3c1a8d9065c6587a4cf615308
Contents?: true
Size: 692 Bytes
Versions: 10
Compression:
Stored size: 692 Bytes
Contents
RSpec::Matchers.define :be_installed do match do |name| if name.respond_to?(:installed?) name.installed?(@provider, @version) else if @provider.nil? backend.check_installed(example, name) else check_method = "check_installed_by_#{@provider}".to_sym unless backend.respond_to?(check_method) || commands.respond_to?(check_method) raise ArgumentError.new("`be_installed` matcher doesn't support #{@under}") end backend.send(check_method, example, name, @version) end end end chain :by do |provider| @provider = provider end chain :with_version do |version| @version = version end end
Version data entries
10 entries across 10 versions & 1 rubygems