mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-17 17:56:26 -07:00
set up example scaffold with rspec + factorybot tests
This commit is contained in:
parent
533c921a6d
commit
d1e6fb1e39
23 changed files with 512 additions and 6 deletions
18
spec/views/dashboard/examples/show.html.erb_spec.rb
Normal file
18
spec/views/dashboard/examples/show.html.erb_spec.rb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
require "rails_helper"
|
||||
|
||||
module Dashboard
|
||||
RSpec.describe "dashboard/examples/show", type: :view do
|
||||
before(:each) do
|
||||
assign(:example, Example.create!(
|
||||
text: "Word",
|
||||
body: "Sentence"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
expect(rendered).to match(/Word/)
|
||||
expect(rendered).to match(/Sentence/)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue