From 45072f34d27bda34b182f14f8b02d778d1648cce Mon Sep 17 00:00:00 2001 From: John Kelly Ferguson Date: Sun, 25 May 2014 18:48:14 -0400 Subject: Rename Posts to Articles in Guides' Getting Started App, continuation of #15215 [ci skip] --- .../app/assets/javascripts/articles.js.coffee | 3 ++ .../app/assets/javascripts/posts.js.coffee | 3 -- .../app/assets/stylesheets/articles.css.scss | 3 ++ .../app/assets/stylesheets/posts.css.scss | 3 -- .../app/controllers/articles_controller.rb | 53 ++++++++++++++++++++++ .../app/controllers/comments_controller.rb | 12 ++--- .../app/controllers/posts_controller.rb | 53 ---------------------- .../getting_started/app/helpers/articles_helper.rb | 2 + .../getting_started/app/helpers/posts_helper.rb | 2 - guides/code/getting_started/app/models/article.rb | 7 +++ guides/code/getting_started/app/models/comment.rb | 2 +- guides/code/getting_started/app/models/post.rb | 7 --- .../app/views/articles/_form.html.erb | 27 +++++++++++ .../app/views/articles/edit.html.erb | 5 ++ .../app/views/articles/index.html.erb | 21 +++++++++ .../app/views/articles/new.html.erb | 5 ++ .../app/views/articles/show.html.erb | 18 ++++++++ .../app/views/comments/_comment.html.erb | 4 +- .../app/views/comments/_form.html.erb | 2 +- .../getting_started/app/views/posts/_form.html.erb | 27 ----------- .../getting_started/app/views/posts/edit.html.erb | 5 -- .../getting_started/app/views/posts/index.html.erb | 21 --------- .../getting_started/app/views/posts/new.html.erb | 5 -- .../getting_started/app/views/posts/show.html.erb | 18 -------- .../app/views/welcome/index.html.erb | 4 +- guides/code/getting_started/config/routes.rb | 2 +- .../db/migrate/20130122042648_create_articles.rb | 10 ++++ .../db/migrate/20130122042648_create_posts.rb | 10 ---- .../db/migrate/20130122045842_create_comments.rb | 2 +- guides/code/getting_started/db/schema.rb | 18 ++++---- .../test/controllers/articles_controller_test.rb | 7 +++ .../test/controllers/posts_controller_test.rb | 7 --- .../getting_started/test/fixtures/articles.yml | 9 ++++ .../getting_started/test/fixtures/comments.yml | 4 +- .../code/getting_started/test/fixtures/posts.yml | 9 ---- .../test/helpers/articles_helper_test.rb | 4 ++ .../test/helpers/posts_helper_test.rb | 4 -- .../getting_started/test/models/article_test.rb | 7 +++ .../code/getting_started/test/models/post_test.rb | 7 --- 39 files changed, 206 insertions(+), 206 deletions(-) create mode 100644 guides/code/getting_started/app/assets/javascripts/articles.js.coffee delete mode 100644 guides/code/getting_started/app/assets/javascripts/posts.js.coffee create mode 100644 guides/code/getting_started/app/assets/stylesheets/articles.css.scss delete mode 100644 guides/code/getting_started/app/assets/stylesheets/posts.css.scss create mode 100644 guides/code/getting_started/app/controllers/articles_controller.rb delete mode 100644 guides/code/getting_started/app/controllers/posts_controller.rb create mode 100644 guides/code/getting_started/app/helpers/articles_helper.rb delete mode 100644 guides/code/getting_started/app/helpers/posts_helper.rb create mode 100644 guides/code/getting_started/app/models/article.rb delete mode 100644 guides/code/getting_started/app/models/post.rb create mode 100644 guides/code/getting_started/app/views/articles/_form.html.erb create mode 100644 guides/code/getting_started/app/views/articles/edit.html.erb create mode 100644 guides/code/getting_started/app/views/articles/index.html.erb create mode 100644 guides/code/getting_started/app/views/articles/new.html.erb create mode 100644 guides/code/getting_started/app/views/articles/show.html.erb delete mode 100644 guides/code/getting_started/app/views/posts/_form.html.erb delete mode 100644 guides/code/getting_started/app/views/posts/edit.html.erb delete mode 100644 guides/code/getting_started/app/views/posts/index.html.erb delete mode 100644 guides/code/getting_started/app/views/posts/new.html.erb delete mode 100644 guides/code/getting_started/app/views/posts/show.html.erb create mode 100644 guides/code/getting_started/db/migrate/20130122042648_create_articles.rb delete mode 100644 guides/code/getting_started/db/migrate/20130122042648_create_posts.rb create mode 100644 guides/code/getting_started/test/controllers/articles_controller_test.rb delete mode 100644 guides/code/getting_started/test/controllers/posts_controller_test.rb create mode 100644 guides/code/getting_started/test/fixtures/articles.yml delete mode 100644 guides/code/getting_started/test/fixtures/posts.yml create mode 100644 guides/code/getting_started/test/helpers/articles_helper_test.rb delete mode 100644 guides/code/getting_started/test/helpers/posts_helper_test.rb create mode 100644 guides/code/getting_started/test/models/article_test.rb delete mode 100644 guides/code/getting_started/test/models/post_test.rb (limited to 'guides/code') diff --git a/guides/code/getting_started/app/assets/javascripts/articles.js.coffee b/guides/code/getting_started/app/assets/javascripts/articles.js.coffee new file mode 100644 index 0000000000..24f83d18bb --- /dev/null +++ b/guides/code/getting_started/app/assets/javascripts/articles.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/guides/code/getting_started/app/assets/javascripts/posts.js.coffee b/guides/code/getting_started/app/assets/javascripts/posts.js.coffee deleted file mode 100644 index 24f83d18bb..0000000000 --- a/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/guides/code/getting_started/app/assets/stylesheets/articles.css.scss b/guides/code/getting_started/app/assets/stylesheets/articles.css.scss new file mode 100644 index 0000000000..cca548710d --- /dev/null +++ b/guides/code/getting_started/app/assets/stylesheets/articles.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the articles controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/guides/code/getting_started/app/assets/stylesheets/posts.css.scss b/guides/code/getting_started/app/assets/stylesheets/posts.css.scss deleted file mode 100644 index 1a7e15390c..0000000000 --- a/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the posts controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/guides/code/getting_started/app/controllers/articles_controller.rb b/guides/code/getting_started/app/controllers/articles_controller.rb new file mode 100644 index 0000000000..275b84e8b7 --- /dev/null +++ b/guides/code/getting_started/app/controllers/articles_controller.rb @@ -0,0 +1,53 @@ +class ArticlesController < ApplicationController + + http_basic_authenticate_with name: "dhh", password: "secret", except: [:index, :show] + + def index + @articles = Article.all + end + + def show + @article = Article.find(params[:id]) + end + + def edit + @article = Article.find(params[:id]) + end + + def update + @article = Article.find(params[:id]) + + if @article.update(article_params) + redirect_to action: :show, id: @article.id + else + render 'edit' + end + end + + def new + @article = Article.new + end + + def create + @article = Article.new(article_params) + + if @article.save + redirect_to action: :show, id: @article.id + else + render 'new' + end + end + + def destroy + @article = Article.find(params[:id]) + @article.destroy + + redirect_to action: :index + end + + private + + def article_params + params.require(:article).permit(:title, :text) + end +end diff --git a/guides/code/getting_started/app/controllers/comments_controller.rb b/guides/code/getting_started/app/controllers/comments_controller.rb index b2d9bcdf7f..61813b1003 100644 --- a/guides/code/getting_started/app/controllers/comments_controller.rb +++ b/guides/code/getting_started/app/controllers/comments_controller.rb @@ -3,16 +3,16 @@ class CommentsController < ApplicationController http_basic_authenticate_with name: "dhh", password: "secret", only: :destroy def create - @post = Post.find(params[:post_id]) - @comment = @post.comments.create(comment_params) - redirect_to post_path(@post) + @article = Article.find(params[:article_id]) + @comment = @article.comments.create(comment_params) + redirect_to article_path(@article) end def destroy - @post = Post.find(params[:post_id]) - @comment = @post.comments.find(params[:id]) + @article = Article.find(params[:article_id]) + @comment = @article.comments.find(params[:id]) @comment.destroy - redirect_to post_path(@post) + redirect_to article_path(@article) end private diff --git a/guides/code/getting_started/app/controllers/posts_controller.rb b/guides/code/getting_started/app/controllers/posts_controller.rb deleted file mode 100644 index 02689ad67b..0000000000 --- a/guides/code/getting_started/app/controllers/posts_controller.rb +++ /dev/null @@ -1,53 +0,0 @@ -class PostsController < ApplicationController - - http_basic_authenticate_with name: "dhh", password: "secret", except: [:index, :show] - - def index - @posts = Post.all - end - - def show - @post = Post.find(params[:id]) - end - - def edit - @post = Post.find(params[:id]) - end - - def update - @post = Post.find(params[:id]) - - if @post.update(post_params) - redirect_to action: :show, id: @post.id - else - render 'edit' - end - end - - def new - @post = Post.new - end - - def create - @post = Post.new(post_params) - - if @post.save - redirect_to action: :show, id: @post.id - else - render 'new' - end - end - - def destroy - @post = Post.find(params[:id]) - @post.destroy - - redirect_to action: :index - end - - private - - def post_params - params.require(:post).permit(:title, :text) - end -end diff --git a/guides/code/getting_started/app/helpers/articles_helper.rb b/guides/code/getting_started/app/helpers/articles_helper.rb new file mode 100644 index 0000000000..2968277595 --- /dev/null +++ b/guides/code/getting_started/app/helpers/articles_helper.rb @@ -0,0 +1,2 @@ +module ArticlesHelper +end diff --git a/guides/code/getting_started/app/helpers/posts_helper.rb b/guides/code/getting_started/app/helpers/posts_helper.rb deleted file mode 100644 index a7b8cec898..0000000000 --- a/guides/code/getting_started/app/helpers/posts_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module PostsHelper -end diff --git a/guides/code/getting_started/app/models/article.rb b/guides/code/getting_started/app/models/article.rb new file mode 100644 index 0000000000..6fc7888be2 --- /dev/null +++ b/guides/code/getting_started/app/models/article.rb @@ -0,0 +1,7 @@ +class Article < ActiveRecord::Base + has_many :comments, dependent: :destroy + + validates :title, + presence: true, + length: { minimum: 5 } +end diff --git a/guides/code/getting_started/app/models/comment.rb b/guides/code/getting_started/app/models/comment.rb index 4e76c5b5b0..e2646a324f 100644 --- a/guides/code/getting_started/app/models/comment.rb +++ b/guides/code/getting_started/app/models/comment.rb @@ -1,3 +1,3 @@ class Comment < ActiveRecord::Base - belongs_to :post + belongs_to :article end diff --git a/guides/code/getting_started/app/models/post.rb b/guides/code/getting_started/app/models/post.rb deleted file mode 100644 index 64e0d721fd..0000000000 --- a/guides/code/getting_started/app/models/post.rb +++ /dev/null @@ -1,7 +0,0 @@ -class Post < ActiveRecord::Base - has_many :comments, dependent: :destroy - - validates :title, - presence: true, - length: { minimum: 5 } -end diff --git a/guides/code/getting_started/app/views/articles/_form.html.erb b/guides/code/getting_started/app/views/articles/_form.html.erb new file mode 100644 index 0000000000..87e3353ed2 --- /dev/null +++ b/guides/code/getting_started/app/views/articles/_form.html.erb @@ -0,0 +1,27 @@ +<%= form_for @article do |f| %> + <% if @article.errors.any? %> +
+

<%= pluralize(@article.errors.count, "error") %> prohibited + this article from being saved:

+ +
+ <% end %> +

+ <%= f.label :title %>
+ <%= f.text_field :title %> +

+ +

+ <%= f.label :text %>
+ <%= f.text_area :text %> +

+ +

+ <%= f.submit %> +

+<% end %> + diff --git a/guides/code/getting_started/app/views/articles/edit.html.erb b/guides/code/getting_started/app/views/articles/edit.html.erb new file mode 100644 index 0000000000..14236e2a98 --- /dev/null +++ b/guides/code/getting_started/app/views/articles/edit.html.erb @@ -0,0 +1,5 @@ +

Edit article

+ +<%= render 'form' %> + +<%= link_to 'Back', action: :index %> diff --git a/guides/code/getting_started/app/views/articles/index.html.erb b/guides/code/getting_started/app/views/articles/index.html.erb new file mode 100644 index 0000000000..80e9c8c60c --- /dev/null +++ b/guides/code/getting_started/app/views/articles/index.html.erb @@ -0,0 +1,21 @@ +

Listing Articles

+ + + + + + + + + +<% @articles.each do |article| %> + + + + + + + +<% end %> +
TitleText
<%= article.title %><%= article.text %><%= link_to 'Show', action: :show, id: article.id %><%= link_to 'Edit', action: :edit, id: article.id %><%= link_to 'Destroy', { action: :destroy, id: article.id }, + method: :delete, data: { confirm: 'Are you sure?' } %>
diff --git a/guides/code/getting_started/app/views/articles/new.html.erb b/guides/code/getting_started/app/views/articles/new.html.erb new file mode 100644 index 0000000000..652b1c9c0b --- /dev/null +++ b/guides/code/getting_started/app/views/articles/new.html.erb @@ -0,0 +1,5 @@ +

New article

+ +<%= render 'form' %> + +<%= link_to 'Back', action: :index %> diff --git a/guides/code/getting_started/app/views/articles/show.html.erb b/guides/code/getting_started/app/views/articles/show.html.erb new file mode 100644 index 0000000000..6959c80bdb --- /dev/null +++ b/guides/code/getting_started/app/views/articles/show.html.erb @@ -0,0 +1,18 @@ +

+ Title: + <%= @article.title %> +

+ +

+ Text: + <%= @article.text %> +

+ +

Comments

+<%= render @article.comments %> + +

Add a comment:

+<%= render "comments/form" %> + +<%= link_to 'Edit Article', edit_article_path(@article) %> | +<%= link_to 'Back to Articles', articles_path %> diff --git a/guides/code/getting_started/app/views/comments/_comment.html.erb b/guides/code/getting_started/app/views/comments/_comment.html.erb index 593493339e..f7cbfaebfa 100644 --- a/guides/code/getting_started/app/views/comments/_comment.html.erb +++ b/guides/code/getting_started/app/views/comments/_comment.html.erb @@ -2,14 +2,14 @@ Commenter: <%= comment.commenter %>

- +

Comment: <%= comment.body %>

- <%= link_to 'Destroy Comment', [comment.post, comment], + <%= link_to 'Destroy Comment', [comment.article, comment], method: :delete, data: { confirm: 'Are you sure?' } %>

diff --git a/guides/code/getting_started/app/views/comments/_form.html.erb b/guides/code/getting_started/app/views/comments/_form.html.erb index 00cb3a08f0..5850c41a17 100644 --- a/guides/code/getting_started/app/views/comments/_form.html.erb +++ b/guides/code/getting_started/app/views/comments/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for([@post, @post.comments.build]) do |f| %> +<%= form_for([@article, @article.comments.build]) do |f| %>

<%= f.label :commenter %>
<%= f.text_field :commenter %> diff --git a/guides/code/getting_started/app/views/posts/_form.html.erb b/guides/code/getting_started/app/views/posts/_form.html.erb deleted file mode 100644 index f2f83585e1..0000000000 --- a/guides/code/getting_started/app/views/posts/_form.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -<%= form_for @post do |f| %> - <% if @post.errors.any? %> -

-

<%= pluralize(@post.errors.count, "error") %> prohibited - this post from being saved:

- -
- <% end %> -

- <%= f.label :title %>
- <%= f.text_field :title %> -

- -

- <%= f.label :text %>
- <%= f.text_area :text %> -

- -

- <%= f.submit %> -

-<% end %> - diff --git a/guides/code/getting_started/app/views/posts/edit.html.erb b/guides/code/getting_started/app/views/posts/edit.html.erb deleted file mode 100644 index 393e7430d0..0000000000 --- a/guides/code/getting_started/app/views/posts/edit.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

Edit post

- -<%= render 'form' %> - -<%= link_to 'Back', action: :index %> diff --git a/guides/code/getting_started/app/views/posts/index.html.erb b/guides/code/getting_started/app/views/posts/index.html.erb deleted file mode 100644 index 7369f0396f..0000000000 --- a/guides/code/getting_started/app/views/posts/index.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -

Listing Posts

- - - - - - - - - -<% @posts.each do |post| %> - - - - - - - -<% end %> -
TitleText
<%= post.title %><%= post.text %><%= link_to 'Show', action: :show, id: post.id %><%= link_to 'Edit', action: :edit, id: post.id %><%= link_to 'Destroy', { action: :destroy, id: post.id }, - method: :delete, data: { confirm: 'Are you sure?' } %>
diff --git a/guides/code/getting_started/app/views/posts/new.html.erb b/guides/code/getting_started/app/views/posts/new.html.erb deleted file mode 100644 index efa81038ec..0000000000 --- a/guides/code/getting_started/app/views/posts/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New post

- -<%= render 'form' %> - -<%= link_to 'Back', action: :index %> diff --git a/guides/code/getting_started/app/views/posts/show.html.erb b/guides/code/getting_started/app/views/posts/show.html.erb deleted file mode 100644 index e99e9edbb3..0000000000 --- a/guides/code/getting_started/app/views/posts/show.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -

- Title: - <%= @post.title %> -

- -

- Text: - <%= @post.text %> -

- -

Comments

-<%= render @post.comments %> - -

Add a comment:

-<%= render "comments/form" %> - -<%= link_to 'Edit Post', edit_post_path(@post) %> | -<%= link_to 'Back to Posts', posts_path %> diff --git a/guides/code/getting_started/app/views/welcome/index.html.erb b/guides/code/getting_started/app/views/welcome/index.html.erb index 56be8dd3cc..1cabd0d217 100644 --- a/guides/code/getting_started/app/views/welcome/index.html.erb +++ b/guides/code/getting_started/app/views/welcome/index.html.erb @@ -1,4 +1,4 @@

Hello, Rails!

-<%= link_to "My Blog", controller: "posts" %> -<%= link_to "New Post", new_post_path %> +<%= link_to "My Blog", controller: "articles" %> +<%= link_to "New Article", new_article_path %> diff --git a/guides/code/getting_started/config/routes.rb b/guides/code/getting_started/config/routes.rb index 65d273b58d..97abca99b9 100644 --- a/guides/code/getting_started/config/routes.rb +++ b/guides/code/getting_started/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - resources :posts do + resources :articles do resources :comments end diff --git a/guides/code/getting_started/db/migrate/20130122042648_create_articles.rb b/guides/code/getting_started/db/migrate/20130122042648_create_articles.rb new file mode 100644 index 0000000000..6bb255e89f --- /dev/null +++ b/guides/code/getting_started/db/migrate/20130122042648_create_articles.rb @@ -0,0 +1,10 @@ +class CreateArticles < ActiveRecord::Migration + def change + create_table :articles do |t| + t.string :title + t.text :text + + t.timestamps + end + end +end diff --git a/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb b/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb deleted file mode 100644 index 602bef31ab..0000000000 --- a/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreatePosts < ActiveRecord::Migration - def change - create_table :posts do |t| - t.string :title - t.text :text - - t.timestamps - end - end -end diff --git a/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb b/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb index 3e51f9c0f7..1f765839ac 100644 --- a/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb +++ b/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb @@ -3,7 +3,7 @@ class CreateComments < ActiveRecord::Migration create_table :comments do |t| t.string :commenter t.text :body - t.references :post, index: true + t.references :article, index: true t.timestamps end diff --git a/guides/code/getting_started/db/schema.rb b/guides/code/getting_started/db/schema.rb index 101fe712a1..be40f7cb0e 100644 --- a/guides/code/getting_started/db/schema.rb +++ b/guides/code/getting_started/db/schema.rb @@ -13,21 +13,21 @@ ActiveRecord::Schema.define(version: 20130122045842) do - create_table "comments", force: true do |t| - t.string "commenter" - t.text "body" - t.integer "post_id" + create_table "articles", force: true do |t| + t.string "title" + t.text "text" t.datetime "created_at" t.datetime "updated_at" end - add_index "comments", ["post_id"], name: "index_comments_on_post_id" - - create_table "posts", force: true do |t| - t.string "title" - t.text "text" + create_table "comments", force: true do |t| + t.string "commenter" + t.text "body" + t.integer "article_id" t.datetime "created_at" t.datetime "updated_at" end + add_index "comments", ["article_id"], name: "index_comments_on_article_id" + end diff --git a/guides/code/getting_started/test/controllers/articles_controller_test.rb b/guides/code/getting_started/test/controllers/articles_controller_test.rb new file mode 100644 index 0000000000..361aa0f47f --- /dev/null +++ b/guides/code/getting_started/test/controllers/articles_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ArticlesControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/guides/code/getting_started/test/controllers/posts_controller_test.rb b/guides/code/getting_started/test/controllers/posts_controller_test.rb deleted file mode 100644 index 7a6ee4f1db..0000000000 --- a/guides/code/getting_started/test/controllers/posts_controller_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class PostsControllerTest < ActionController::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/guides/code/getting_started/test/fixtures/articles.yml b/guides/code/getting_started/test/fixtures/articles.yml new file mode 100644 index 0000000000..46b01c3bb4 --- /dev/null +++ b/guides/code/getting_started/test/fixtures/articles.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + title: MyString + text: MyText + +two: + title: MyString + text: MyText diff --git a/guides/code/getting_started/test/fixtures/comments.yml b/guides/code/getting_started/test/fixtures/comments.yml index 9e409d8a61..05ad26f051 100644 --- a/guides/code/getting_started/test/fixtures/comments.yml +++ b/guides/code/getting_started/test/fixtures/comments.yml @@ -3,9 +3,9 @@ one: commenter: MyString body: MyText - post_id: + article_id: two: commenter: MyString body: MyText - post_id: + article_id: diff --git a/guides/code/getting_started/test/fixtures/posts.yml b/guides/code/getting_started/test/fixtures/posts.yml deleted file mode 100644 index 46b01c3bb4..0000000000 --- a/guides/code/getting_started/test/fixtures/posts.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - title: MyString - text: MyText - -two: - title: MyString - text: MyText diff --git a/guides/code/getting_started/test/helpers/articles_helper_test.rb b/guides/code/getting_started/test/helpers/articles_helper_test.rb new file mode 100644 index 0000000000..b341344067 --- /dev/null +++ b/guides/code/getting_started/test/helpers/articles_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class ArticlesHelperTest < ActionView::TestCase +end diff --git a/guides/code/getting_started/test/helpers/posts_helper_test.rb b/guides/code/getting_started/test/helpers/posts_helper_test.rb deleted file mode 100644 index 48549c2ea1..0000000000 --- a/guides/code/getting_started/test/helpers/posts_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class PostsHelperTest < ActionView::TestCase -end diff --git a/guides/code/getting_started/test/models/article_test.rb b/guides/code/getting_started/test/models/article_test.rb new file mode 100644 index 0000000000..11c8abe5f4 --- /dev/null +++ b/guides/code/getting_started/test/models/article_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ArticleTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/guides/code/getting_started/test/models/post_test.rb b/guides/code/getting_started/test/models/post_test.rb deleted file mode 100644 index 6d9d463a71..0000000000 --- a/guides/code/getting_started/test/models/post_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class PostTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end -- cgit v1.2.3