2021-09-26 15:22:36 -07:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
|
|
RSpec.describe "articles/show", type: :view do
|
|
|
|
|
before(:each) do
|
|
|
|
|
@article = assign(:article, Article.create!(
|
|
|
|
|
title: "Title",
|
2021-12-16 14:40:07 -08:00
|
|
|
content: "MyContent"
|
2021-09-26 15:22:36 -07:00
|
|
|
))
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it "renders attributes in <p>" do
|
|
|
|
|
render
|
|
|
|
|
expect(rendered).to match(/Title/)
|
2021-12-16 14:40:07 -08:00
|
|
|
expect(rendered).to match(/MyContent/)
|
2021-09-26 15:22:36 -07:00
|
|
|
end
|
|
|
|
|
end
|