comments
This commit is contained in:
15
spec/views/comments/edit.html.erb_spec.rb
Normal file
15
spec/views/comments/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "comments/edit" do
|
||||
before(:each) do
|
||||
@comment = assign(:comment, stub_model(Comment))
|
||||
end
|
||||
|
||||
it "renders the edit comment form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", comment_path(@comment), "post" do
|
||||
end
|
||||
end
|
||||
end
|
||||
15
spec/views/comments/index.html.erb_spec.rb
Normal file
15
spec/views/comments/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "comments/index" do
|
||||
before(:each) do
|
||||
assign(:comments, [
|
||||
stub_model(Comment),
|
||||
stub_model(Comment)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of comments" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
end
|
||||
end
|
||||
15
spec/views/comments/new.html.erb_spec.rb
Normal file
15
spec/views/comments/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "comments/new" do
|
||||
before(:each) do
|
||||
assign(:comment, stub_model(Comment).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new comment form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", comments_path, "post" do
|
||||
end
|
||||
end
|
||||
end
|
||||
12
spec/views/comments/show.html.erb_spec.rb
Normal file
12
spec/views/comments/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "comments/show" do
|
||||
before(:each) do
|
||||
@comment = assign(:comment, stub_model(Comment))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user