File tree 1 file changed +4
-4
lines changed
spec/generators/rspec/scaffold
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 208
208
before { run_generator %w[ posts upvotes:integer downvotes:integer ] }
209
209
subject { file ( "spec/views/posts/index.html.erb_spec.rb" ) }
210
210
it { is_expected . to exist }
211
- it { is_expected . to contain ( 'assert_select "tr>td" , text: 2.to_s, count: 2' ) }
212
- it { is_expected . to contain ( 'assert_select "tr>td" , text: 3.to_s, count: 2' ) }
211
+ it { is_expected . to contain ( 'assert_select cell_selector , text: Regexp.new( 2.to_s) , count: 2' ) }
212
+ it { is_expected . to contain ( 'assert_select cell_selector , text: Regexp.new( 3.to_s) , count: 2' ) }
213
213
end
214
214
215
215
describe 'with multiple float attributes index' do
216
216
before { run_generator %w[ posts upvotes:float downvotes:float ] }
217
217
subject { file ( "spec/views/posts/index.html.erb_spec.rb" ) }
218
218
it { is_expected . to exist }
219
- it { is_expected . to contain ( 'assert_select "tr>td" , text: 2.5.to_s, count: 2' ) }
220
- it { is_expected . to contain ( 'assert_select "tr>td" , text: 3.5.to_s, count: 2' ) }
219
+ it { is_expected . to contain ( 'assert_select cell_selector , text: Regexp.new( 2.5.to_s) , count: 2' ) }
220
+ it { is_expected . to contain ( 'assert_select cell_selector , text: Regexp.new( 3.5.to_s) , count: 2' ) }
221
221
end
222
222
223
223
describe 'with reference attribute' do
You can’t perform that action at this time.
0 commit comments