dont duplicate predicate fields

This commit is contained in:
Ben Balter 2017-07-25 13:57:25 -04:00
parent a0fbdad2c7
commit 89643b313f
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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