Skip to content

Commit 625fe44

Browse files
author
Sam Phippen
committed
Change render_views specs to match more generic headers.
In Rails 5, the word "Listing" has been removed from the autogenerated scaffold header, so here we match with a simple regex.
1 parent 6e252ee commit 625fe44

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

features/controller_specs/render_views.feature

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Feature: render_views
1212
render_views
1313
1414
describe "GET index" do
15-
it "says 'Listing widgets'" do
15+
it "has a widgets related heading" do
1616
get :index
17-
expect(response.body).to match /Listing widgets/im
17+
expect(response.body).to match /<h1>.*widgets/im
1818
end
1919
end
2020
end
@@ -34,7 +34,7 @@ Feature: render_views
3434
describe "GET index" do
3535
it "renders the actual template" do
3636
get :index
37-
expect(response.body).to match /Listing widgets/im
37+
expect(response.body).to match /<h1>.*widgets/im
3838
end
3939
end
4040
@@ -65,7 +65,7 @@ Feature: render_views
6565
describe "GET index" do
6666
it "renders the actual template" do
6767
get :index
68-
expect(response.body).to match /Listing widgets/im
68+
expect(response.body).to match /<h1>.*widgets/im
6969
end
7070
end
7171
end
@@ -105,7 +105,7 @@ Feature: render_views
105105
describe "GET index" do
106106
it "renders the index template" do
107107
get :index
108-
expect(response.body).to match /Listing widgets/im
108+
expect(response.body).to match /<h1>.*widgets/im
109109
end
110110
end
111111
end

0 commit comments

Comments
 (0)