Module: Erb::Formtastic::ContentMatchers

Defined in:
lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inputs_listObject



21
22
23
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 21

def self.inputs_list
  [ :radio, :date, :text, :select, :checkboxes, :time_zone, :password, :date, :datetime, :time, :boolean, :string, :numeric, :country, :hidden ]
end

Instance Method Details

#have_buttons(name) ⇒ Object Also known as: have_button_field_set



12
13
14
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 12

def have_buttons name 
  have_form_call :buttons
end

#have_commit_buttonObject



58
59
60
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 58

def have_commit_button 
  have_form_call :commit_button
end

#have_errors_for(name) ⇒ Object Also known as: have_inline_errors_for



45
46
47
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 45

def have_errors_for name
  have_form_call :input, :args => ":#{name}"
end

#have_input(name) ⇒ Object



37
38
39
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 37

def have_input name 
  have_form_call :input, :args => ":#{name}"
end

#have_inputs(name) ⇒ Object Also known as: have_input_field_set



7
8
9
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 7

def have_inputs name 
  have_form_call :inputs, :args => ":name => #{name}"
end

#have_label(name) ⇒ Object



17
18
19
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 17

def have_label name 
  have_form_call :label, :args => ":#{name}"
end

#have_required_input(name) ⇒ Object



41
42
43
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 41

def have_required_input name 
  have_form_call :input, :args => ":#{name}, :required => true"
end

#have_semantic_errorsObject



50
51
52
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 50

def have_semantic_errors
  have_form_call :semantic_errors
end

#have_semantic_fields_forObject



54
55
56
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 54

def have_semantic_fields_for
  have_form_call :semantic_fields_for
end

#have_semantic_form_for(name) ⇒ Object



3
4
5
# File 'lib/forms-spec/erb/matchers/formtastic/have_formtastic.rb', line 3

def have_semantic_form_for name
  have_form_call :semantic_form_for, :args => name
end