[from now] 2014/11/18 19:15:07

diff --git a/Gemfile b/Gemfile
index e96a170..e91b41c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -30,6 +30,8 @@ gem 'awesome_print'

 gem 'devise'

+gem 'feedbag'
+
 gem 'feedjira'

 gem 'rails_config'
diff --git a/Gemfile.lock b/Gemfile.lock
index ce19a84..dd9c931 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -91,6 +91,8 @@ GEM
     diff-lcs (1.2.5)
     erubis (2.7.0)
     execjs (2.2.2)
+    feedbag (0.9.5)
+      nokogiri (~> 1.0)
     feedjira (1.5.0)
       curb (~> 0.8)
       loofah (~> 2.0)
@@ -279,6 +281,7 @@ DEPENDENCIES
   compass-rails
   database_rewinder
   devise
+  feedbag
   feedjira
   groundworkcss
   guard-rspec
diff --git a/app/assets/javascripts/feeds.js.coffee b/app/assets/javascripts/feeds.js.coffee
new file mode 100644
index 0000000..24f83d1
--- /dev/null
+++ b/app/assets/javascripts/feeds.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/app/assets/stylesheets/feeds.css.scss b/app/assets/stylesheets/feeds.css.scss
new file mode 100644
index 0000000..a00cb5b
--- /dev/null
+++ b/app/assets/stylesheets/feeds.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the feeds controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb
new file mode 100644
index 0000000..3128eaa
--- /dev/null
+++ b/app/controllers/feeds_controller.rb
@@ -0,0 +1,47 @@
+class FeedsController < ApplicationController
+  before_action :set_feed, only: [:show, :edit, :update, :destroy]
+
+  respond_to :html
+
+  def index
+    @feeds = Feed.all
+    respond_with(@feeds)
+  end
+
+  def show
+    respond_with(@feed)
+  end
+
+  def new
+    @feed = Feed.new
+    respond_with(@feed)
+  end
+
+  def edit
+  end
+
+  def create
+    @feed = Feed.new(feed_params)
+    @feed.save
+    respond_with(@feed)
+  end
+
+  def update
+    @feed.update(feed_params)
+    respond_with(@feed)
+  end
+
+  def destroy
+    @feed.destroy
+    respond_with(@feed)
+  end
+
+  private
+    def set_feed
+      @feed = Feed.find(params[:id])
+    end
+
+    def feed_params
+      params.require(:feed).permit(:name, :url, :endpoint, :etag, :last_modified, :fetched_at, :category_id, :user_id, :misc)
+    end
+end
diff --git a/app/helpers/feeds_helper.rb b/app/helpers/feeds_helper.rb
new file mode 100644
index 0000000..d48dcc2
--- /dev/null
+++ b/app/helpers/feeds_helper.rb
@@ -0,0 +1,2 @@
+module FeedsHelper
+end
diff --git a/app/models/feed.rb b/app/models/feed.rb
new file mode 100644
index 0000000..d8bea2c
--- /dev/null
+++ b/app/models/feed.rb
@@ -0,0 +1,4 @@
+class Feed < ActiveRecord::Base
+  belongs_to :category
+  belongs_to :user
+end
diff --git a/app/views/feeds/_form.html.erb b/app/views/feeds/_form.html.erb
new file mode 100644
index 0000000..a8d92e4
--- /dev/null
+++ b/app/views/feeds/_form.html.erb
@@ -0,0 +1,53 @@
+<%= form_for(@feed) do |f| %>
+  <% if @feed.errors.any? %>
+    <div id="error_explanation">
+      <h2><%= pluralize(@feed.errors.count, "error") %> prohibited this feed from being saved:</h2>
+
+      <ul>
+      <% @feed.errors.full_messages.each do |message| %>
+        <li><%= message %></li>
+      <% end %>
+      </ul>
+    </div>
+  <% end %>
+
+  <div class="field">
+    <%= f.label :name %><br>
+    <%= f.text_field :name %>
+  </div>
+  <div class="field">
+    <%= f.label :url %><br>
+    <%= f.text_field :url %>
+  </div>
+  <div class="field">
+    <%= f.label :endpoint %><br>
+    <%= f.text_field :endpoint %>
+  </div>
+  <div class="field">
+    <%= f.label :etag %><br>
+    <%= f.text_field :etag %>
+  </div>
+  <div class="field">
+    <%= f.label :last_modified %><br>
+    <%= f.datetime_select :last_modified %>
+  </div>
+  <div class="field">
+    <%= f.label :fetched_at %><br>
+    <%= f.datetime_select :fetched_at %>
+  </div>
+  <div class="field">
+    <%= f.label :category_id %><br>
+    <%= f.text_field :category_id %>
+  </div>
+  <div class="field">
+    <%= f.label :user_id %><br>
+    <%= f.text_field :user_id %>
+  </div>
+  <div class="field">
+    <%= f.label :misc %><br>
+    <%= f.text_area :misc %>
+  </div>
+  <div class="actions">
+    <%= f.submit %>
+  </div>
+<% end %>
diff --git a/app/views/feeds/edit.html.erb b/app/views/feeds/edit.html.erb
new file mode 100644
index 0000000..74100d2
--- /dev/null
+++ b/app/views/feeds/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing feed</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @feed %> |
+<%= link_to 'Back', feeds_path %>
diff --git a/app/views/feeds/index.html.erb b/app/views/feeds/index.html.erb
new file mode 100644
index 0000000..1d136f9
--- /dev/null
+++ b/app/views/feeds/index.html.erb
@@ -0,0 +1,41 @@
+<h1>Listing feeds</h1>
+
+<table>
+  <thead>
+    <tr>
+      <th>Name</th>
+      <th>Url</th>
+      <th>Endpoint</th>
+      <th>Etag</th>
+      <th>Last modified</th>
+      <th>Fetched at</th>
+      <th>Category</th>
+      <th>User</th>
+      <th>Misc</th>
+      <th colspan="3"></th>
+    </tr>
+  </thead>
+
+  <tbody>
+    <% @feeds.each do |feed| %>
+      <tr>
+        <td><%= feed.name %></td>
+        <td><%= feed.url %></td>
+        <td><%= feed.endpoint %></td>
+        <td><%= feed.etag %></td>
+        <td><%= feed.last_modified %></td>
+        <td><%= feed.fetched_at %></td>
+        <td><%= feed.category %></td>
+        <td><%= feed.user %></td>
+        <td><%= feed.misc %></td>
+        <td><%= link_to 'Show', feed %></td>
+        <td><%= link_to 'Edit', edit_feed_path(feed) %></td>
+        <td><%= link_to 'Destroy', feed, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+      </tr>
+    <% end %>
+  </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Feed', new_feed_path %>
diff --git a/app/views/feeds/index.json.jbuilder b/app/views/feeds/index.json.jbuilder
new file mode 100644
index 0000000..17be9f6
--- /dev/null
+++ b/app/views/feeds/index.json.jbuilder
@@ -0,0 +1,4 @@
+json.array!(@feeds) do |feed|
+  json.extract! feed, :id, :name, :url, :endpoint, :etag, :last_modified, :fetched_at, :category_id, :user_id, :misc
+  json.url feed_url(feed, format: :json)
+end
diff --git a/app/views/feeds/new.html.erb b/app/views/feeds/new.html.erb
new file mode 100644
index 0000000..68ce3a0
--- /dev/null
+++ b/app/views/feeds/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New feed</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', feeds_path %>
diff --git a/app/views/feeds/show.html.erb b/app/views/feeds/show.html.erb
new file mode 100644
index 0000000..87f61d1
--- /dev/null
+++ b/app/views/feeds/show.html.erb
@@ -0,0 +1,49 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+  <strong>Name:</strong>
+  <%= @feed.name %>
+</p>
+
+<p>
+  <strong>Url:</strong>
+  <%= @feed.url %>
+</p>
+
+<p>
+  <strong>Endpoint:</strong>
+  <%= @feed.endpoint %>
+</p>
+
+<p>
+  <strong>Etag:</strong>
+  <%= @feed.etag %>
+</p>
+
+<p>
+  <strong>Last modified:</strong>
+  <%= @feed.last_modified %>
+</p>
+
+<p>
+  <strong>Fetched at:</strong>
+  <%= @feed.fetched_at %>
+</p>
+
+<p>
+  <strong>Category:</strong>
+  <%= @feed.category %>
+</p>
+
+<p>
+  <strong>User:</strong>
+  <%= @feed.user %>
+</p>
+
+<p>
+  <strong>Misc:</strong>
+  <%= @feed.misc %>
+</p>
+
+<%= link_to 'Edit', edit_feed_path(@feed) %> |
+<%= link_to 'Back', feeds_path %>
diff --git a/app/views/feeds/show.json.jbuilder b/app/views/feeds/show.json.jbuilder
new file mode 100644
index 0000000..3998ff4
--- /dev/null
+++ b/app/views/feeds/show.json.jbuilder
@@ -0,0 +1 @@
+json.extract! @feed, :id, :name, :url, :endpoint, :etag, :last_modified, :fetched_at, :category_id, :user_id, :misc, :created_at, :updated_at
diff --git a/config/routes.rb b/config/routes.rb
index 742421a..a0254bb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,6 @@
 Rails.application.routes.draw do
+  resources :feeds
+
   resources :categories

   # Devise
diff --git a/db/migrate/20141118101244_create_feeds.rb b/db/migrate/20141118101244_create_feeds.rb
new file mode 100644
index 0000000..7019b11
--- /dev/null
+++ b/db/migrate/20141118101244_create_feeds.rb
@@ -0,0 +1,17 @@
+class CreateFeeds < ActiveRecord::Migration
+  def change
+    create_table :feeds do |t|
+      t.string :name
+      t.string :url
+      t.string :endpoint
+      t.string :etag
+      t.datetime :last_modified
+      t.datetime :fetched_at
+      t.references :category, index: true
+      t.references :user, index: true
+      t.text :misc
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f890b38..488cad8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.

-ActiveRecord::Schema.define(version: 20141118070922) do
+ActiveRecord::Schema.define(version: 20141118101244) do

   create_table "categories", force: true do |t|
     t.string   "name"
@@ -23,6 +23,23 @@ ActiveRecord::Schema.define(version: 20141118070922) do

   add_index "categories", ["user_id"], name: "index_categories_on_user_id"

+  create_table "feeds", force: true do |t|
+    t.string   "name"
+    t.string   "url"
+    t.string   "endpoint"
+    t.string   "etag"
+    t.datetime "last_modified"
+    t.datetime "fetched_at"
+    t.integer  "category_id"
+    t.integer  "user_id"
+    t.text     "misc"
+    t.datetime "created_at"
+    t.datetime "updated_at"
+  end
+
+  add_index "feeds", ["category_id"], name: "index_feeds_on_category_id"
+  add_index "feeds", ["user_id"], name: "index_feeds_on_user_id"
+
   create_table "users", force: true do |t|
     t.string   "email",                  default: "", null: false
     t.string   "encrypted_password",     default: "", null: false
diff --git a/doc/mensagg TableDesign.numbers/Index.zip b/doc/mensagg TableDesign.numbers/Index.zip
index 5d7411c..7329207 100644
Binary files a/doc/mensagg TableDesign.numbers/Index.zip and b/doc/mensagg TableDesign.numbers/Index.zip differ
diff --git a/doc/mensagg TableDesign.numbers/Metadata/Properties.plist b/doc/mensagg TableDesign.numbers/Metadata/Properties.plist
index 6f87fcd..0e00296 100644
Binary files a/doc/mensagg TableDesign.numbers/Metadata/Properties.plist and b/doc/mensagg TableDesign.numbers/Metadata/Properties.plist differ
diff --git a/doc/mensagg TableDesign.numbers/preview-micro.jpg b/doc/mensagg TableDesign.numbers/preview-micro.jpg
index 7d4ec20..1e86684 100644
Binary files a/doc/mensagg TableDesign.numbers/preview-micro.jpg and b/doc/mensagg TableDesign.numbers/preview-micro.jpg differ
diff --git a/doc/mensagg TableDesign.numbers/preview-web.jpg b/doc/mensagg TableDesign.numbers/preview-web.jpg
index 19b9bcd..96abc69 100644
Binary files a/doc/mensagg TableDesign.numbers/preview-web.jpg and b/doc/mensagg TableDesign.numbers/preview-web.jpg differ
diff --git a/doc/mensagg TableDesign.numbers/preview.jpg b/doc/mensagg TableDesign.numbers/preview.jpg
index 8905d1c..1dbd797 100644
Binary files a/doc/mensagg TableDesign.numbers/preview.jpg and b/doc/mensagg TableDesign.numbers/preview.jpg differ
diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb
new file mode 100644
index 0000000..5727df6
--- /dev/null
+++ b/spec/controllers/feeds_controller_spec.rb
@@ -0,0 +1,159 @@
+require 'rails_helper'
+
+# This spec was generated by rspec-rails when you ran the scaffold generator.
+# It demonstrates how one might use RSpec to specify the controller code that
+# was generated by Rails when you ran the scaffold generator.
+#
+# It assumes that the implementation code is generated by the rails scaffold
+# generator.  If you are using any extension libraries to generate different
+# controller code, this generated spec may or may not pass.
+#
+# It only uses APIs available in rails and/or rspec-rails.  There are a number
+# of tools you can use to make these specs even more expressive, but we're
+# sticking to rails and rspec-rails APIs to keep things simple and stable.
+#
+# Compared to earlier versions of this generator, there is very limited use of
+# stubs and message expectations in this spec.  Stubs are only used when there
+# is no simpler way to get a handle on the object needed for the example.
+# Message expectations are only used when there is no simpler way to specify
+# that an instance is receiving a specific message.
+
+RSpec.describe FeedsController, :type => :controller do
+
+  # This should return the minimal set of attributes required to create a valid
+  # Feed. As you add validations to Feed, be sure to
+  # adjust the attributes here as well.
+  let(:valid_attributes) {
+    skip("Add a hash of attributes valid for your model")
+  }
+
+  let(:invalid_attributes) {
+    skip("Add a hash of attributes invalid for your model")
+  }
+
+  # This should return the minimal set of values that should be in the session
+  # in order to pass any filters (e.g. authentication) defined in
+  # FeedsController. Be sure to keep this updated too.
+  let(:valid_session) { {} }
+
+  describe "GET index" do
+    it "assigns all feeds as @feeds" do
+      feed = Feed.create! valid_attributes
+      get :index, {}, valid_session
+      expect(assigns(:feeds)).to eq([feed])
+    end
+  end
+
+  describe "GET show" do
+    it "assigns the requested feed as @feed" do
+      feed = Feed.create! valid_attributes
+      get :show, {:id => feed.to_param}, valid_session
+      expect(assigns(:feed)).to eq(feed)
+    end
+  end
+
+  describe "GET new" do
+    it "assigns a new feed as @feed" do
+      get :new, {}, valid_session
+      expect(assigns(:feed)).to be_a_new(Feed)
+    end
+  end
+
+  describe "GET edit" do
+    it "assigns the requested feed as @feed" do
+      feed = Feed.create! valid_attributes
+      get :edit, {:id => feed.to_param}, valid_session
+      expect(assigns(:feed)).to eq(feed)
+    end
+  end
+
+  describe "POST create" do
+    describe "with valid params" do
+      it "creates a new Feed" do
+        expect {
+          post :create, {:feed => valid_attributes}, valid_session
+        }.to change(Feed, :count).by(1)
+      end
+
+      it "assigns a newly created feed as @feed" do
+        post :create, {:feed => valid_attributes}, valid_session
+        expect(assigns(:feed)).to be_a(Feed)
+        expect(assigns(:feed)).to be_persisted
+      end
+
+      it "redirects to the created feed" do
+        post :create, {:feed => valid_attributes}, valid_session
+        expect(response).to redirect_to(Feed.last)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns a newly created but unsaved feed as @feed" do
+        post :create, {:feed => invalid_attributes}, valid_session
+        expect(assigns(:feed)).to be_a_new(Feed)
+      end
+
+      it "re-renders the 'new' template" do
+        post :create, {:feed => invalid_attributes}, valid_session
+        expect(response).to render_template("new")
+      end
+    end
+  end
+
+  describe "PUT update" do
+    describe "with valid params" do
+      let(:new_attributes) {
+        skip("Add a hash of attributes valid for your model")
+      }
+
+      it "updates the requested feed" do
+        feed = Feed.create! valid_attributes
+        put :update, {:id => feed.to_param, :feed => new_attributes}, valid_session
+        feed.reload
+        skip("Add assertions for updated state")
+      end
+
+      it "assigns the requested feed as @feed" do
+        feed = Feed.create! valid_attributes
+        put :update, {:id => feed.to_param, :feed => valid_attributes}, valid_session
+        expect(assigns(:feed)).to eq(feed)
+      end
+
+      it "redirects to the feed" do
+        feed = Feed.create! valid_attributes
+        put :update, {:id => feed.to_param, :feed => valid_attributes}, valid_session
+        expect(response).to redirect_to(feed)
+      end
+    end
+
+    describe "with invalid params" do
+      it "assigns the feed as @feed" do
+        feed = Feed.create! valid_attributes
+        put :update, {:id => feed.to_param, :feed => invalid_attributes}, valid_session
+        expect(assigns(:feed)).to eq(feed)
+      end
+
+      it "re-renders the 'edit' template" do
+        feed = Feed.create! valid_attributes
+        put :update, {:id => feed.to_param, :feed => invalid_attributes}, valid_session
+        expect(response).to render_template("edit")
+      end
+    end
+  end
+
+  describe "DELETE destroy" do
+    it "destroys the requested feed" do
+      feed = Feed.create! valid_attributes
+      expect {
+        delete :destroy, {:id => feed.to_param}, valid_session
+      }.to change(Feed, :count).by(-1)
+    end
+
+    it "redirects to the feeds list" do
+      feed = Feed.create! valid_attributes
+      delete :destroy, {:id => feed.to_param}, valid_session
+      expect(response).to redirect_to(feeds_url)
+    end
+  end
+
+end
diff --git a/spec/helpers/feeds_helper_spec.rb b/spec/helpers/feeds_helper_spec.rb
new file mode 100644
index 0000000..413ae37
--- /dev/null
+++ b/spec/helpers/feeds_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'rails_helper'
+
+# Specs in this file have access to a helper object that includes
+# the FeedsHelper. For example:
+#
+# describe FeedsHelper do
+#   describe "string concat" do
+#     it "concats two strings with spaces" do
+#       expect(helper.concat_strings("this","that")).to eq("this that")
+#     end
+#   end
+# end
+RSpec.describe FeedsHelper, :type => :helper do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/models/feed_spec.rb b/spec/models/feed_spec.rb
new file mode 100644
index 0000000..2f4e517
--- /dev/null
+++ b/spec/models/feed_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Feed, :type => :model do
+  pending "add some examples to (or delete) #{__FILE__}"
+end
diff --git a/spec/requests/feeds_spec.rb b/spec/requests/feeds_spec.rb
new file mode 100644
index 0000000..f9455c3
--- /dev/null
+++ b/spec/requests/feeds_spec.rb
@@ -0,0 +1,10 @@
+require 'rails_helper'
+
+RSpec.describe "Feeds", :type => :request do
+  describe "GET /feeds" do
+    it "works! (now write some real specs)" do
+      get feeds_path
+      expect(response).to have_http_status(200)
+    end
+  end
+end
diff --git a/spec/routing/feeds_routing_spec.rb b/spec/routing/feeds_routing_spec.rb
new file mode 100644
index 0000000..1307c49
--- /dev/null
+++ b/spec/routing/feeds_routing_spec.rb
@@ -0,0 +1,35 @@
+require "rails_helper"
+
+RSpec.describe FeedsController, :type => :routing do
+  describe "routing" do
+
+    it "routes to #index" do
+      expect(:get => "/feeds").to route_to("feeds#index")
+    end
+
+    it "routes to #new" do
+      expect(:get => "/feeds/new").to route_to("feeds#new")
+    end
+
+    it "routes to #show" do
+      expect(:get => "/feeds/1").to route_to("feeds#show", :id => "1")
+    end
+
+    it "routes to #edit" do
+      expect(:get => "/feeds/1/edit").to route_to("feeds#edit", :id => "1")
+    end
+
+    it "routes to #create" do
+      expect(:post => "/feeds").to route_to("feeds#create")
+    end
+
+    it "routes to #update" do
+      expect(:put => "/feeds/1").to route_to("feeds#update", :id => "1")
+    end
+
+    it "routes to #destroy" do
+      expect(:delete => "/feeds/1").to route_to("feeds#destroy", :id => "1")
+    end
+
+  end
+end
diff --git a/spec/views/feeds/edit.html.erb_spec.rb b/spec/views/feeds/edit.html.erb_spec.rb
new file mode 100644
index 0000000..3e1919b
--- /dev/null
+++ b/spec/views/feeds/edit.html.erb_spec.rb
@@ -0,0 +1,36 @@
+require 'rails_helper'
+
+RSpec.describe "feeds/edit", :type => :view do
+  before(:each) do
+    @feed = assign(:feed, Feed.create!(
+      :name => "MyString",
+      :url => "MyString",
+      :endpoint => "MyString",
+      :etag => "MyString",
+      :category => nil,
+      :user => nil,
+      :misc => "MyText"
+    ))
+  end
+
+  it "renders the edit feed form" do
+    render
+
+    assert_select "form[action=?][method=?]", feed_path(@feed), "post" do
+
+      assert_select "input#feed_name[name=?]", "feed[name]"
+
+      assert_select "input#feed_url[name=?]", "feed[url]"
+
+      assert_select "input#feed_endpoint[name=?]", "feed[endpoint]"
+
+      assert_select "input#feed_etag[name=?]", "feed[etag]"
+
+      assert_select "input#feed_category_id[name=?]", "feed[category_id]"
+
+      assert_select "input#feed_user_id[name=?]", "feed[user_id]"
+
+      assert_select "textarea#feed_misc[name=?]", "feed[misc]"
+    end
+  end
+end
diff --git a/spec/views/feeds/index.html.erb_spec.rb b/spec/views/feeds/index.html.erb_spec.rb
new file mode 100644
index 0000000..1c59f96
--- /dev/null
+++ b/spec/views/feeds/index.html.erb_spec.rb
@@ -0,0 +1,37 @@
+require 'rails_helper'
+
+RSpec.describe "feeds/index", :type => :view do
+  before(:each) do
+    assign(:feeds, [
+      Feed.create!(
+        :name => "Name",
+        :url => "Url",
+        :endpoint => "Endpoint",
+        :etag => "Etag",
+        :category => nil,
+        :user => nil,
+        :misc => "MyText"
+      ),
+      Feed.create!(
+        :name => "Name",
+        :url => "Url",
+        :endpoint => "Endpoint",
+        :etag => "Etag",
+        :category => nil,
+        :user => nil,
+        :misc => "MyText"
+      )
+    ])
+  end
+
+  it "renders a list of feeds" do
+    render
+    assert_select "tr>td", :text => "Name".to_s, :count => 2
+    assert_select "tr>td", :text => "Url".to_s, :count => 2
+    assert_select "tr>td", :text => "Endpoint".to_s, :count => 2
+    assert_select "tr>td", :text => "Etag".to_s, :count => 2
+    assert_select "tr>td", :text => nil.to_s, :count => 2
+    assert_select "tr>td", :text => nil.to_s, :count => 2
+    assert_select "tr>td", :text => "MyText".to_s, :count => 2
+  end
+end
diff --git a/spec/views/feeds/new.html.erb_spec.rb b/spec/views/feeds/new.html.erb_spec.rb
new file mode 100644
index 0000000..9d72601
--- /dev/null
+++ b/spec/views/feeds/new.html.erb_spec.rb
@@ -0,0 +1,36 @@
+require 'rails_helper'
+
+RSpec.describe "feeds/new", :type => :view do
+  before(:each) do
+    assign(:feed, Feed.new(
+      :name => "MyString",
+      :url => "MyString",
+      :endpoint => "MyString",
+      :etag => "MyString",
+      :category => nil,
+      :user => nil,
+      :misc => "MyText"
+    ))
+  end
+
+  it "renders new feed form" do
+    render
+
+    assert_select "form[action=?][method=?]", feeds_path, "post" do
+
+      assert_select "input#feed_name[name=?]", "feed[name]"
+
+      assert_select "input#feed_url[name=?]", "feed[url]"
+
+      assert_select "input#feed_endpoint[name=?]", "feed[endpoint]"
+
+      assert_select "input#feed_etag[name=?]", "feed[etag]"
+
+      assert_select "input#feed_category_id[name=?]", "feed[category_id]"
+
+      assert_select "input#feed_user_id[name=?]", "feed[user_id]"
+
+      assert_select "textarea#feed_misc[name=?]", "feed[misc]"
+    end
+  end
+end
diff --git a/spec/views/feeds/show.html.erb_spec.rb b/spec/views/feeds/show.html.erb_spec.rb
new file mode 100644
index 0000000..5e3521c
--- /dev/null
+++ b/spec/views/feeds/show.html.erb_spec.rb
@@ -0,0 +1,26 @@
+require 'rails_helper'
+
+RSpec.describe "feeds/show", :type => :view do
+  before(:each) do
+    @feed = assign(:feed, Feed.create!(
+      :name => "Name",
+      :url => "Url",
+      :endpoint => "Endpoint",
+      :etag => "Etag",
+      :category => nil,
+      :user => nil,
+      :misc => "MyText"
+    ))
+  end
+
+  it "renders attributes in <p>" do
+    render
+    expect(rendered).to match(/Name/)
+    expect(rendered).to match(/Url/)
+    expect(rendered).to match(/Endpoint/)
+    expect(rendered).to match(/Etag/)
+    expect(rendered).to match(//)
+    expect(rendered).to match(//)
+    expect(rendered).to match(/MyText/)
+  end
+end