mirror of https://github.com/licensee/licensee.git
dont duplicate predicate fields
This commit is contained in:
parent
a0fbdad2c7
commit
89643b313f
|
@ -39,7 +39,7 @@ module Licensee
|
|||
|
||||
# Array of symbolized helper methods to expose on the License class
|
||||
def helper_methods
|
||||
members + PREDICATE_FIELDS.map { |f| "#{f}?".to_sym }
|
||||
members - PREDICATE_FIELDS + PREDICATE_FIELDS.map { |f| "#{f}?".to_sym }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -98,8 +98,9 @@ RSpec.describe Licensee::LicenseMeta do
|
|||
end
|
||||
|
||||
it 'returns the list of helper methods' do
|
||||
expect(described_class.helper_methods.length).to eql(15)
|
||||
expect(described_class.helper_methods.length).to eql(13)
|
||||
expect(described_class.helper_methods).to include(:hidden?)
|
||||
expect(described_class.helper_methods).to_not include(:hidden)
|
||||
expect(described_class.helper_methods).to include(:title)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue