Skip to content

Commit 92d3640

Browse files
Fix scaffold specs
1 parent bd9158d commit 92d3640

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/generators/rspec/scaffold/scaffold_generator_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,16 @@
208208
before { run_generator %w[posts upvotes:integer downvotes:integer] }
209209
subject { file("spec/views/posts/index.html.erb_spec.rb") }
210210
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') }
213213
end
214214

215215
describe 'with multiple float attributes index' do
216216
before { run_generator %w[posts upvotes:float downvotes:float] }
217217
subject { file("spec/views/posts/index.html.erb_spec.rb") }
218218
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') }
221221
end
222222

223223
describe 'with reference attribute' do

0 commit comments

Comments
 (0)