@@ -46,13 +46,13 @@ def it_should_have_a_nested_ordered_list_with_class(klass)
46
46
47
47
def it_should_have_label_with_text ( string_or_regex )
48
48
it "should have a label with text '#{ string_or_regex } '" do
49
- output_buffer . should have_tag ( "form li label" , string_or_regex )
49
+ output_buffer . should have_tag ( "form div.control-group label.control- label" , string_or_regex )
50
50
end
51
51
end
52
52
53
53
def it_should_have_label_for ( element_id )
54
54
it "should have a label for ##{ element_id } " do
55
- output_buffer . should have_tag ( "form li label.label[@for='#{ element_id } ']" )
55
+ output_buffer . should have_tag ( "form div.control-group label.control- label[@for='#{ element_id } ']" )
56
56
end
57
57
end
58
58
@@ -76,13 +76,13 @@ def it_should_have_select_with_id(element_id)
76
76
77
77
def it_should_have_input_with_type ( input_type )
78
78
it "should have a #{ input_type } input" do
79
- output_buffer . should have_tag ( "form li input[@type=\" #{ input_type } \" ]" )
79
+ output_buffer . should have_tag ( "form div.control-group div.controls input[@type=\" #{ input_type } \" ]" )
80
80
end
81
81
end
82
82
83
83
def it_should_have_input_with_name ( name )
84
84
it "should have an input named #{ name } " do
85
- output_buffer . should have_tag ( "form li input[@name=\" #{ name } \" ]" )
85
+ output_buffer . should have_tag ( "form div.control-group div.controls input[@name=\" #{ name } \" ]" )
86
86
end
87
87
end
88
88
@@ -106,8 +106,8 @@ def it_should_have_textarea_with_id(element_id)
106
106
107
107
def it_should_have_label_and_input_with_id ( element_id )
108
108
it "should have an input with id '#{ element_id } '" do
109
- output_buffer . should have_tag ( "form li input##{ element_id } " )
110
- output_buffer . should have_tag ( "form li label[@for='#{ element_id } ']" )
109
+ output_buffer . should have_tag ( "form div.control-group div.controls input##{ element_id } " )
110
+ output_buffer . should have_tag ( "form div.control-group label.control- label[@for='#{ element_id } ']" )
111
111
end
112
112
end
113
113
@@ -117,7 +117,7 @@ def it_should_use_default_text_field_size_when_not_nil(as)
117
117
concat ( semantic_form_for ( @new_post ) do |builder |
118
118
concat ( builder . input ( :title , :as => as ) )
119
119
end )
120
- output_buffer . should have_tag ( "form li input[@size='#{ Formtastic ::FormBuilder . default_text_field_size } ']" )
120
+ output_buffer . should have_tag ( "form div.control-group div.controls input[@size='#{ Formtastic ::FormBuilder . default_text_field_size } ']" )
121
121
end
122
122
end
123
123
end
@@ -128,8 +128,8 @@ def it_should_not_use_default_text_field_size_when_nil(as)
128
128
concat ( semantic_form_for ( @new_post ) do |builder |
129
129
concat ( builder . input ( :title , :as => as ) )
130
130
end )
131
- output_buffer . should have_tag ( "form li input" )
132
- output_buffer . should_not have_tag ( "form li input[@size]" )
131
+ output_buffer . should have_tag ( "form div.control-group div.controls input" )
132
+ output_buffer . should_not have_tag ( "form div.control-group div.controls input[@size]" )
133
133
end
134
134
end
135
135
end
@@ -139,7 +139,7 @@ def it_should_apply_custom_input_attributes_when_input_html_provided(as)
139
139
concat ( semantic_form_for ( @new_post ) do |builder |
140
140
concat ( builder . input ( :title , :as => as , :input_html => { :class => 'myclass' } ) )
141
141
end )
142
- output_buffer . should have_tag ( "form li input.myclass" )
142
+ output_buffer . should have_tag ( "form div.control-group div.controls input.myclass" )
143
143
end
144
144
end
145
145
@@ -148,14 +148,14 @@ def it_should_apply_custom_for_to_label_when_input_html_id_provided(as)
148
148
concat ( semantic_form_for ( @new_post ) do |builder |
149
149
concat ( builder . input ( :title , :as => as , :input_html => { :id => 'myid' } ) )
150
150
end )
151
- output_buffer . should have_tag ( 'form li label[@for="myid"]' )
151
+ output_buffer . should have_tag ( 'form div.control-group label.control- label[@for="myid"]' )
152
152
end
153
153
end
154
154
155
155
def it_should_have_maxlength_matching_column_limit
156
156
it 'should have a maxlength matching column limit' do
157
157
@new_post . column_for_attribute ( :title ) . limit . should == 50
158
- output_buffer . should have_tag ( "form li input[@maxlength='50']" )
158
+ output_buffer . should have_tag ( "form div.control-group div.controls input[@maxlength='50']" )
159
159
end
160
160
end
161
161
0 commit comments