Commit cf6c3f40 by Tô Ngọc Ánh

Ex2: Add variable title

parent 13dadb1d
Pipeline #654 failed with stages
in 0 seconds
......@@ -12,6 +12,8 @@ require 'rails_helper'
describe "Static pages" do
let(:base_title) { "Ruby on Rails Tutorial Sample App" }
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
......@@ -20,7 +22,7 @@ describe "Static pages" do
it "should have the right title" do
visit '/static_pages/home'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | Home")
expect(page).to have_title("#{base_title} | Home")
end
end
......@@ -32,7 +34,7 @@ describe "Static pages" do
it "should have the title 'Help'" do
visit '/static_pages/help'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | Help")
expect(page).to have_title("#{base_title} | Help")
end
end
......@@ -44,7 +46,7 @@ describe "Static pages" do
it "should have the title 'About Us'" do
visit '/static_pages/about'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | About Us")
end
expect(page).to have_title("#{base_title} | About Us")
end
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment