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



8
9
10
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 8

def field_list
  as_list(@fields)
end

#pluralize_fieldsObject



16
17
18
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 16

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

#were_was(list) ⇒ Object



12
13
14
# File 'lib/pathway/rspec/matchers/field_list_helpers.rb', line 12

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