Module: RSpec::RubyContentMatchers::LicenseClass

Defined in:
lib/cantango/rspec/matchers/have_license_class.rb

Instance Method Summary collapse

Instance Method Details

#have_license_class(name, superclass = 'License::Base') ⇒ Object



3
4
5
# File 'lib/cantango/rspec/matchers/have_license_class.rb', line 3

def have_license_class name, superclass = 'License::Base'
  superclass ? have_subclass(name.to_s + 'License', superclass) : have_class(name)
end

#have_license_classes(*names) ⇒ Object



7
8
9
10
11
12
# File 'lib/cantango/rspec/matchers/have_license_class.rb', line 7

def have_license_classes *names
  names.each do |name|
    return false if !have_license_class(name)
  end
  true
end