formtastic 2.1.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +1 -0
  3. data/.github/workflows/test.yml +61 -0
  4. data/.gitignore +4 -2
  5. data/CHANGELOG.md +52 -0
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +105 -0
  8. data/MIT-LICENSE +1 -1
  9. data/{README.textile → README.md} +204 -219
  10. data/RELEASE_PROCESS +3 -1
  11. data/Rakefile +27 -29
  12. data/app/assets/stylesheets/formtastic.css +3 -2
  13. data/bin/appraisal +8 -0
  14. data/formtastic.gemspec +11 -14
  15. data/gemfiles/rails_5.2/Gemfile +5 -0
  16. data/gemfiles/rails_6.0/Gemfile +5 -0
  17. data/gemfiles/rails_6.1/Gemfile +5 -0
  18. data/gemfiles/rails_edge/Gemfile +13 -0
  19. data/lib/formtastic/action_class_finder.rb +18 -0
  20. data/lib/formtastic/actions/button_action.rb +55 -60
  21. data/lib/formtastic/actions/input_action.rb +59 -57
  22. data/lib/formtastic/actions/link_action.rb +68 -67
  23. data/lib/formtastic/actions.rb +6 -3
  24. data/lib/formtastic/deprecation.rb +5 -0
  25. data/lib/formtastic/engine.rb +3 -1
  26. data/lib/formtastic/form_builder.rb +35 -16
  27. data/lib/formtastic/helpers/action_helper.rb +34 -28
  28. data/lib/formtastic/helpers/enum.rb +13 -0
  29. data/lib/formtastic/helpers/errors_helper.rb +2 -2
  30. data/lib/formtastic/helpers/fieldset_wrapper.rb +16 -12
  31. data/lib/formtastic/helpers/form_helper.rb +19 -16
  32. data/lib/formtastic/helpers/input_helper.rb +69 -97
  33. data/lib/formtastic/helpers/inputs_helper.rb +35 -25
  34. data/lib/formtastic/helpers/reflection.rb +4 -4
  35. data/lib/formtastic/helpers.rb +1 -2
  36. data/lib/formtastic/html_attributes.rb +12 -1
  37. data/lib/formtastic/i18n.rb +1 -1
  38. data/lib/formtastic/input_class_finder.rb +18 -0
  39. data/lib/formtastic/inputs/base/choices.rb +2 -2
  40. data/lib/formtastic/inputs/base/collections.rb +46 -14
  41. data/lib/formtastic/inputs/base/database.rb +7 -2
  42. data/lib/formtastic/inputs/base/datetime_pickerish.rb +85 -0
  43. data/lib/formtastic/inputs/base/errors.rb +7 -7
  44. data/lib/formtastic/inputs/base/hints.rb +2 -2
  45. data/lib/formtastic/inputs/base/html.rb +10 -9
  46. data/lib/formtastic/inputs/base/labelling.rb +5 -8
  47. data/lib/formtastic/inputs/base/naming.rb +4 -4
  48. data/lib/formtastic/inputs/base/numeric.rb +1 -1
  49. data/lib/formtastic/inputs/base/options.rb +3 -4
  50. data/lib/formtastic/inputs/base/stringish.rb +10 -2
  51. data/lib/formtastic/inputs/base/timeish.rb +34 -22
  52. data/lib/formtastic/inputs/base/validations.rb +41 -13
  53. data/lib/formtastic/inputs/base/wrapping.rb +29 -26
  54. data/lib/formtastic/inputs/base.rb +22 -15
  55. data/lib/formtastic/inputs/boolean_input.rb +26 -12
  56. data/lib/formtastic/inputs/check_boxes_input.rb +39 -31
  57. data/lib/formtastic/inputs/color_input.rb +41 -0
  58. data/lib/formtastic/inputs/country_input.rb +24 -5
  59. data/lib/formtastic/inputs/datalist_input.rb +41 -0
  60. data/lib/formtastic/inputs/date_picker_input.rb +93 -0
  61. data/lib/formtastic/inputs/{date_input.rb → date_select_input.rb} +1 -1
  62. data/lib/formtastic/inputs/datetime_picker_input.rb +103 -0
  63. data/lib/formtastic/inputs/{datetime_input.rb → datetime_select_input.rb} +1 -1
  64. data/lib/formtastic/inputs/file_input.rb +2 -2
  65. data/lib/formtastic/inputs/hidden_input.rb +2 -6
  66. data/lib/formtastic/inputs/radio_input.rb +28 -22
  67. data/lib/formtastic/inputs/select_input.rb +36 -39
  68. data/lib/formtastic/inputs/time_picker_input.rb +99 -0
  69. data/lib/formtastic/inputs/{time_input.rb → time_select_input.rb} +6 -2
  70. data/lib/formtastic/inputs/time_zone_input.rb +16 -6
  71. data/lib/formtastic/inputs.rb +32 -21
  72. data/lib/formtastic/localized_string.rb +1 -1
  73. data/lib/formtastic/localizer.rb +24 -24
  74. data/lib/formtastic/namespaced_class_finder.rb +99 -0
  75. data/lib/formtastic/version.rb +1 -1
  76. data/lib/formtastic.rb +20 -10
  77. data/lib/generators/formtastic/form/form_generator.rb +10 -4
  78. data/lib/generators/formtastic/input/input_generator.rb +46 -0
  79. data/lib/generators/formtastic/install/install_generator.rb +5 -19
  80. data/lib/generators/templates/_form.html.slim +2 -2
  81. data/lib/generators/templates/formtastic.rb +46 -25
  82. data/lib/generators/templates/input.rb +19 -0
  83. data/sample/basic_inputs.html +23 -3
  84. data/script/integration-template.rb +74 -0
  85. data/script/integration.sh +19 -0
  86. data/spec/action_class_finder_spec.rb +12 -0
  87. data/spec/actions/button_action_spec.rb +8 -8
  88. data/spec/actions/generic_action_spec.rb +92 -56
  89. data/spec/actions/input_action_spec.rb +7 -7
  90. data/spec/actions/link_action_spec.rb +10 -10
  91. data/spec/builder/custom_builder_spec.rb +36 -20
  92. data/spec/builder/error_proc_spec.rb +4 -4
  93. data/spec/builder/semantic_fields_for_spec.rb +28 -29
  94. data/spec/fast_spec_helper.rb +12 -0
  95. data/spec/generators/formtastic/form/form_generator_spec.rb +45 -32
  96. data/spec/generators/formtastic/input/input_generator_spec.rb +124 -0
  97. data/spec/generators/formtastic/install/install_generator_spec.rb +9 -9
  98. data/spec/helpers/action_helper_spec.rb +75 -103
  99. data/spec/helpers/actions_helper_spec.rb +17 -17
  100. data/spec/helpers/form_helper_spec.rb +84 -33
  101. data/spec/helpers/input_helper_spec.rb +333 -285
  102. data/spec/helpers/inputs_helper_spec.rb +167 -121
  103. data/spec/helpers/reflection_helper_spec.rb +3 -3
  104. data/spec/helpers/semantic_errors_helper_spec.rb +23 -23
  105. data/spec/i18n_spec.rb +26 -26
  106. data/spec/input_class_finder_spec.rb +10 -0
  107. data/spec/inputs/base/collections_spec.rb +76 -0
  108. data/spec/inputs/base/validations_spec.rb +480 -0
  109. data/spec/inputs/boolean_input_spec.rb +100 -65
  110. data/spec/inputs/check_boxes_input_spec.rb +200 -101
  111. data/spec/inputs/color_input_spec.rb +85 -0
  112. data/spec/inputs/country_input_spec.rb +20 -20
  113. data/spec/inputs/custom_input_spec.rb +3 -4
  114. data/spec/inputs/datalist_input_spec.rb +61 -0
  115. data/spec/inputs/date_picker_input_spec.rb +449 -0
  116. data/spec/inputs/date_select_input_spec.rb +249 -0
  117. data/spec/inputs/datetime_picker_input_spec.rb +490 -0
  118. data/spec/inputs/datetime_select_input_spec.rb +209 -0
  119. data/spec/inputs/email_input_spec.rb +5 -5
  120. data/spec/inputs/file_input_spec.rb +6 -6
  121. data/spec/inputs/hidden_input_spec.rb +22 -35
  122. data/spec/inputs/include_blank_spec.rb +11 -11
  123. data/spec/inputs/label_spec.rb +62 -25
  124. data/spec/inputs/number_input_spec.rb +112 -112
  125. data/spec/inputs/password_input_spec.rb +5 -5
  126. data/spec/inputs/phone_input_spec.rb +5 -5
  127. data/spec/inputs/placeholder_spec.rb +6 -6
  128. data/spec/inputs/radio_input_spec.rb +99 -55
  129. data/spec/inputs/range_input_spec.rb +66 -66
  130. data/spec/inputs/readonly_spec.rb +50 -0
  131. data/spec/inputs/search_input_spec.rb +5 -5
  132. data/spec/inputs/select_input_spec.rb +170 -170
  133. data/spec/inputs/string_input_spec.rb +68 -16
  134. data/spec/inputs/text_input_spec.rb +16 -16
  135. data/spec/inputs/time_picker_input_spec.rb +455 -0
  136. data/spec/inputs/time_select_input_spec.rb +261 -0
  137. data/spec/inputs/time_zone_input_spec.rb +54 -28
  138. data/spec/inputs/url_input_spec.rb +5 -5
  139. data/spec/inputs/with_options_spec.rb +7 -7
  140. data/spec/localizer_spec.rb +39 -17
  141. data/spec/namespaced_class_finder_spec.rb +79 -0
  142. data/spec/schema.rb +21 -0
  143. data/spec/spec_helper.rb +254 -221
  144. data/spec/support/custom_macros.rb +128 -95
  145. data/spec/support/shared_examples.rb +12 -0
  146. data/spec/support/specialized_class_finder_shared_example.rb +27 -0
  147. data/spec/support/test_environment.rb +26 -10
  148. metadata +177 -238
  149. data/.travis.yml +0 -8
  150. data/Appraisals +0 -11
  151. data/CHANGELOG +0 -371
  152. data/gemfiles/rails-3.0.gemfile +0 -7
  153. data/gemfiles/rails-3.1.gemfile +0 -7
  154. data/gemfiles/rails-3.2.gemfile +0 -7
  155. data/lib/formtastic/helpers/buttons_helper.rb +0 -310
  156. data/lib/formtastic/inputs/base/grouped_collections.rb +0 -77
  157. data/lib/formtastic/util.rb +0 -25
  158. data/lib/tasks/verify_rcov.rb +0 -44
  159. data/spec/helpers/buttons_helper_spec.rb +0 -166
  160. data/spec/helpers/commit_button_helper_spec.rb +0 -530
  161. data/spec/inputs/date_input_spec.rb +0 -227
  162. data/spec/inputs/datetime_input_spec.rb +0 -185
  163. data/spec/inputs/time_input_spec.rb +0 -267
  164. data/spec/support/deferred_garbage_collection.rb +0 -21
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'spec_helper'
3
3
 
4
- describe 'string input' do
4
+ RSpec.describe 'string input' do
5
5
 
6
6
  include FormtasticSpecHelper
7
7
 
@@ -37,23 +37,23 @@ describe 'string input' do
37
37
  concat(semantic_form_for(@new_post) do |builder|
38
38
  concat(builder.input(method))
39
39
  end)
40
- output_buffer.should have_tag("form li input[@maxlength='#{maxlength}']")
40
+ expect(output_buffer).to have_tag("form li input[@maxlength='#{maxlength}']")
41
41
  end
42
42
 
43
43
  describe 'and its a ActiveModel' do
44
44
  let(:default_maxlength) { 50 }
45
45
 
46
46
  before do
47
- @new_post.stub!(:class).and_return(::PostModel)
47
+ allow(@new_post).to receive(:class).and_return(::PostModel)
48
48
  end
49
49
 
50
50
  after do
51
- @new_post.stub!(:class).and_return(::Post)
51
+ allow(@new_post).to receive(:class).and_return(::Post)
52
52
  end
53
53
 
54
54
  describe 'and validates_length_of was called for the method' do
55
55
  def should_have_maxlength(maxlength, options)
56
- @new_post.class.should_receive(:validators_on).with(:title).at_least(1).and_return([
56
+ expect(@new_post.class).to receive(:validators_on).with(:title).at_least(1).and_return([
57
57
  active_model_length_validator([:title], options[:options])
58
58
  ])
59
59
 
@@ -61,7 +61,7 @@ describe 'string input' do
61
61
  concat(builder.input(:title))
62
62
  end)
63
63
 
64
- output_buffer.should have_tag("form li input##{@new_post.class.name.underscore}_title[@maxlength='#{maxlength}']")
64
+ expect(output_buffer).to have_tag("form li input##{@new_post.class.name.underscore}_title[@maxlength='#{maxlength}']")
65
65
  end
66
66
 
67
67
  it 'should have maxlength if the optional :if or :unless options are not supplied' do
@@ -81,12 +81,12 @@ describe 'string input' do
81
81
  end
82
82
 
83
83
  it 'should have default maxlength if the optional :if with a method name evaluates to false' do
84
- @new_post.should_receive(:specify_maxlength).at_least(1).and_return(false)
84
+ expect(@new_post).to receive(:specify_maxlength).at_least(1).and_return(false)
85
85
  should_have_maxlength(default_maxlength, :options => { :maximum => 42, :if => :specify_maxlength })
86
86
  end
87
87
 
88
88
  it 'should have maxlength if the optional :if with a method name evaluates to true' do
89
- @new_post.should_receive(:specify_maxlength).at_least(1).and_return(true)
89
+ expect(@new_post).to receive(:specify_maxlength).at_least(1).and_return(true)
90
90
  should_have_maxlength(42, :options => { :maximum => 42, :if => :specify_maxlength })
91
91
  end
92
92
 
@@ -99,15 +99,67 @@ describe 'string input' do
99
99
  end
100
100
 
101
101
  it 'should have default maxlength if the optional :unless with a method name evaluates to true' do
102
- @new_post.should_receive(:specify_maxlength).at_least(1).and_return(true)
102
+ expect(@new_post).to receive(:specify_maxlength).at_least(1).and_return(true)
103
103
  should_have_maxlength(default_maxlength, :options => { :maximum => 42, :unless => :specify_maxlength })
104
104
  end
105
105
 
106
106
  it 'should have maxlength if the optional :unless with a method name evaluates to false' do
107
- @new_post.should_receive(:specify_maxlength).at_least(1).and_return(false)
107
+ expect(@new_post).to receive(:specify_maxlength).at_least(1).and_return(false)
108
108
  should_have_maxlength(42, :options => { :maximum => 42, :unless => :specify_maxlength })
109
109
  end
110
110
  end
111
+
112
+ describe 'any conditional validation' do
113
+ describe 'proc that calls an instance method' do
114
+ it 'calls the method on the object' do
115
+ expect(@new_post).to receive(:something?)
116
+ expect(@new_post.class).to receive(:validators_on).with(:title).at_least(1).and_return([
117
+ active_model_presence_validator([:title], { :unless => -> { something? } })
118
+ ])
119
+ concat(semantic_form_for(@new_post) do |builder|
120
+ concat(builder.input(:title))
121
+ end)
122
+ end
123
+ end
124
+
125
+ describe 'proc with arity that calls an instance method' do
126
+ it 'calls the method on the object' do
127
+ expect(@new_post).to receive(:something?)
128
+ expect(@new_post.class).to receive(:validators_on).with(:title).at_least(1).and_return([
129
+ active_model_presence_validator([:title], { :unless => ->(user) { user.something? } })
130
+ ])
131
+ concat(semantic_form_for(@new_post) do |builder|
132
+ concat(builder.input(:title))
133
+ end)
134
+ end
135
+ end
136
+
137
+ describe 'symbol method name' do
138
+ it 'calls the method on the object if the method exists' do
139
+ expect(@new_post).to receive(:something?)
140
+ expect(@new_post.class).to receive(:validators_on).with(:title).at_least(1).and_return([
141
+ active_model_presence_validator([:title], { :unless => :something? })
142
+ ])
143
+ concat(semantic_form_for(@new_post) do |builder|
144
+ concat(builder.input(:title))
145
+ end)
146
+ end
147
+ end
148
+
149
+ describe 'any other conditional' do
150
+ it 'does not raise an error' do
151
+ @conditional = double()
152
+ expect(@new_post.class).to receive(:validators_on).with(:title).at_least(1).and_return([
153
+ active_model_presence_validator([:title], { :unless => @conditional })
154
+ ])
155
+ concat(semantic_form_for(@new_post) do |builder|
156
+ concat(builder.input(:title))
157
+ end)
158
+ end
159
+ end
160
+
161
+ end
162
+
111
163
  end
112
164
  end
113
165
 
@@ -138,15 +190,15 @@ describe 'string input' do
138
190
  end
139
191
 
140
192
  it 'should index the id of the wrapper' do
141
- output_buffer.should have_tag("li#post_author_attributes_3_name_input")
193
+ expect(output_buffer).to have_tag("li#post_author_attributes_3_name_input")
142
194
  end
143
195
 
144
196
  it 'should index the id of the select tag' do
145
- output_buffer.should have_tag("input#post_author_attributes_3_name")
197
+ expect(output_buffer).to have_tag("input#post_author_attributes_3_name")
146
198
  end
147
199
 
148
200
  it 'should index the name of the select tag' do
149
- output_buffer.should have_tag("input[@name='post[author_attributes][3][name]']")
201
+ expect(output_buffer).to have_tag("input[@name='post[author_attributes][3][name]']")
150
202
  end
151
203
 
152
204
  end
@@ -174,7 +226,7 @@ describe 'string input' do
174
226
  end
175
227
 
176
228
  it "should have no size attribute" do
177
- output_buffer.should_not have_tag("input[@size]")
229
+ expect(output_buffer).not_to have_tag("input[@size]")
178
230
  end
179
231
  end
180
232
 
@@ -186,7 +238,7 @@ describe 'string input' do
186
238
  concat(semantic_form_for(@new_post) do |builder|
187
239
  concat(builder.input(:title, :as => :string, :required => true))
188
240
  end)
189
- output_buffer.should have_tag("input[@required]")
241
+ expect(output_buffer).to have_tag("input[@required]")
190
242
  end
191
243
  end
192
244
  end
@@ -197,7 +249,7 @@ describe 'string input' do
197
249
  concat(semantic_form_for(@new_post) do |builder|
198
250
  concat(builder.input(:title, :as => :string, :required => true))
199
251
  end)
200
- output_buffer.should_not have_tag("input[@required]")
252
+ expect(output_buffer).not_to have_tag("input[@required]")
201
253
  end
202
254
  end
203
255
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'spec_helper'
3
3
 
4
- describe 'text input' do
4
+ RSpec.describe 'text input' do
5
5
 
6
6
  include FormtasticSpecHelper
7
7
 
@@ -28,7 +28,7 @@ describe 'text input' do
28
28
  concat(semantic_form_for(@new_post) do |builder|
29
29
  concat(builder.input(:title, :as => :text, :input_html => { :class => 'myclass' }))
30
30
  end)
31
- output_buffer.should have_tag("form li textarea.myclass")
31
+ expect(output_buffer).to have_tag("form li textarea.myclass")
32
32
  end
33
33
 
34
34
  it "should have a cols attribute when :cols is a number in :input_html" do
@@ -36,7 +36,7 @@ describe 'text input' do
36
36
  concat(semantic_form_for(@new_post) do |builder|
37
37
  concat(builder.input(:title, :as => :text, :input_html => { :cols => 42 }))
38
38
  end)
39
- output_buffer.should have_tag("form li textarea[@cols='42']")
39
+ expect(output_buffer).to have_tag("form li textarea[@cols='42']")
40
40
  end
41
41
 
42
42
  it "should not have a cols attribute when :cols is nil in :input_html" do
@@ -44,7 +44,7 @@ describe 'text input' do
44
44
  concat(semantic_form_for(@new_post) do |builder|
45
45
  concat(builder.input(:title, :as => :text, :input_html => { :cols => nil }))
46
46
  end)
47
- output_buffer.should_not have_tag("form li textarea[@cols]")
47
+ expect(output_buffer).not_to have_tag("form li textarea[@cols]")
48
48
  end
49
49
 
50
50
  it "should have a rows attribute when :rows is a number in :input_html" do
@@ -52,7 +52,7 @@ describe 'text input' do
52
52
  concat(semantic_form_for(@new_post) do |builder|
53
53
  concat(builder.input(:title, :as => :text, :input_html => { :rows => 42 }))
54
54
  end)
55
- output_buffer.should have_tag("form li textarea[@rows='42']")
55
+ expect(output_buffer).to have_tag("form li textarea[@rows='42']")
56
56
 
57
57
  end
58
58
 
@@ -61,7 +61,7 @@ describe 'text input' do
61
61
  concat(semantic_form_for(@new_post) do |builder|
62
62
  concat(builder.input(:title, :as => :text, :input_html => { :rows => nil }))
63
63
  end)
64
- output_buffer.should_not have_tag("form li textarea[@rows]")
64
+ expect(output_buffer).not_to have_tag("form li textarea[@rows]")
65
65
  end
66
66
 
67
67
  describe "when namespace is provided" do
@@ -95,15 +95,15 @@ describe 'text input' do
95
95
  end
96
96
 
97
97
  it 'should index the id of the wrapper' do
98
- output_buffer.should have_tag("li#post_author_attributes_3_name_input")
98
+ expect(output_buffer).to have_tag("li#post_author_attributes_3_name_input")
99
99
  end
100
100
 
101
101
  it 'should index the id of the select tag' do
102
- output_buffer.should have_tag("textarea#post_author_attributes_3_name")
102
+ expect(output_buffer).to have_tag("textarea#post_author_attributes_3_name")
103
103
  end
104
104
 
105
105
  it 'should index the name of the select tag' do
106
- output_buffer.should have_tag("textarea[@name='post[author_attributes][3][name]']")
106
+ expect(output_buffer).to have_tag("textarea[@name='post[author_attributes][3][name]']")
107
107
  end
108
108
 
109
109
  end
@@ -114,13 +114,13 @@ describe 'text input' do
114
114
  concat(semantic_form_for(@new_post) do |builder|
115
115
  concat(builder.input(:title, :as => :text, :required => true))
116
116
  end)
117
- output_buffer.should have_tag("textarea[@required]")
117
+ expect(output_buffer).to have_tag("textarea[@required]")
118
118
  end
119
119
  end
120
120
  end
121
121
 
122
122
  context "when :autofocus is provided in :input_html" do
123
- before(:each) do
123
+ before(:example) do
124
124
  concat(semantic_form_for(@new_post) do |builder|
125
125
  concat(builder.input(:title, :input_html => {:autofocus => true}))
126
126
  end)
@@ -129,7 +129,7 @@ describe 'text input' do
129
129
  it_should_have_input_wrapper_with_class("autofocus")
130
130
 
131
131
  it "should add the autofocus attribute to the input's html options" do
132
- output_buffer.should have_tag("input[@autofocus]")
132
+ expect(output_buffer).to have_tag("input[@autofocus]")
133
133
  end
134
134
  end
135
135
 
@@ -143,7 +143,7 @@ describe 'text input' do
143
143
  concat(semantic_form_for(@new_post) do |builder|
144
144
  concat(builder.input(:title, :as => :text))
145
145
  end)
146
- output_buffer.should have_tag("form li textarea[@rows='12']")
146
+ expect(output_buffer).to have_tag("form li textarea[@rows='12']")
147
147
  end
148
148
  end
149
149
 
@@ -152,7 +152,7 @@ describe 'text input' do
152
152
  concat(semantic_form_for(@new_post) do |builder|
153
153
  concat(builder.input(:title, :as => :text))
154
154
  end)
155
- output_buffer.should_not have_tag("form li textarea[@rows]")
155
+ expect(output_buffer).not_to have_tag("form li textarea[@rows]")
156
156
  end
157
157
 
158
158
  end
@@ -168,7 +168,7 @@ describe 'text input' do
168
168
  concat(semantic_form_for(@new_post) do |builder|
169
169
  concat(builder.input(:title, :as => :text))
170
170
  end)
171
- output_buffer.should have_tag("form li textarea[@cols='10']")
171
+ expect(output_buffer).to have_tag("form li textarea[@cols='10']")
172
172
  end
173
173
  end
174
174
 
@@ -177,7 +177,7 @@ describe 'text input' do
177
177
  concat(semantic_form_for(@new_post) do |builder|
178
178
  concat(builder.input(:title, :as => :text))
179
179
  end)
180
- output_buffer.should_not have_tag("form li textarea[@cols]")
180
+ expect(output_buffer).not_to have_tag("form li textarea[@cols]")
181
181
  end
182
182
 
183
183
  end