Module: Pathway::Rspec::FieldListHelpers

Includes:
ListHelpers
Included in:
FormSchemaHelpers
Defined in:
lib/pathway/rspec/matchers/field_list_helpers.rb

Instance Method Summary collapse

Methods included from ListHelpers

#as_list, #as_sentence

Instance Method Details

#field_listObject



10
11
12
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 10

def field_list
  as_list(@fields)
end

#pluralize_fieldsObject



18
19
20
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 18

def pluralize_fields
  @fields.size > 1 ? 'fields' : 'field'
end

#were_was(list) ⇒ Object



14
15
16
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 14

def were_was(list)
  list.size > 1 ? 'were' : 'was'
end