Use spork instead of spring
Conflicts: Guardfile spec/spec_helper.rb
This commit is contained in:
parent
2d4e7e59a6
commit
5c49f8d25c
10 changed files with 60 additions and 54 deletions
3
app/assets/javascripts/pastes.js.coffee
Normal file
3
app/assets/javascripts/pastes.js.coffee
Normal file
|
@ -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/
|
3
app/assets/stylesheets/pastes.css.scss
Normal file
3
app/assets/stylesheets/pastes.css.scss
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
// Place all the styles related to the pastes controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
19
app/controllers/pastes_controller.rb
Normal file
19
app/controllers/pastes_controller.rb
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
class PastesController < ApplicationController
|
||||||
|
def index
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
end
|
||||||
|
|
||||||
|
def new
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
end
|
||||||
|
end
|
2
app/helpers/pastes_helper.rb
Normal file
2
app/helpers/pastes_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
module PastesHelper
|
||||||
|
end
|
1
app/views/pastes/edit.html.erb
Normal file
1
app/views/pastes/edit.html.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Edit
|
1
app/views/pastes/index.html.erb
Normal file
1
app/views/pastes/index.html.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Hello, World!
|
1
app/views/pastes/new.html.erb
Normal file
1
app/views/pastes/new.html.erb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
New
|
|
@ -1,56 +1,4 @@
|
||||||
Tack2us::Application.routes.draw do
|
Tack2us::Application.routes.draw do
|
||||||
# The priority is based upon order of creation: first created -> highest priority.
|
root to: "pastes#index"
|
||||||
# See how all your routes lay out with "rake routes".
|
resources :pastes
|
||||||
|
|
||||||
# You can have the root of your site routed with "root"
|
|
||||||
# root 'welcome#index'
|
|
||||||
|
|
||||||
# Example of regular route:
|
|
||||||
# get 'products/:id' => 'catalog#view'
|
|
||||||
|
|
||||||
# Example of named route that can be invoked with purchase_url(id: product.id)
|
|
||||||
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
|
||||||
|
|
||||||
# Example resource route (maps HTTP verbs to controller actions automatically):
|
|
||||||
# resources :products
|
|
||||||
|
|
||||||
# Example resource route with options:
|
|
||||||
# resources :products do
|
|
||||||
# member do
|
|
||||||
# get 'short'
|
|
||||||
# post 'toggle'
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# collection do
|
|
||||||
# get 'sold'
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
# Example resource route with sub-resources:
|
|
||||||
# resources :products do
|
|
||||||
# resources :comments, :sales
|
|
||||||
# resource :seller
|
|
||||||
# end
|
|
||||||
|
|
||||||
# Example resource route with more complex sub-resources:
|
|
||||||
# resources :products do
|
|
||||||
# resources :comments
|
|
||||||
# resources :sales do
|
|
||||||
# get 'recent', on: :collection
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
# Example resource route with concerns:
|
|
||||||
# concern :toggleable do
|
|
||||||
# post 'toggle'
|
|
||||||
# end
|
|
||||||
# resources :posts, concerns: :toggleable
|
|
||||||
# resources :photos, concerns: :toggleable
|
|
||||||
|
|
||||||
# Example resource route within a namespace:
|
|
||||||
# namespace :admin do
|
|
||||||
# # Directs /admin/products/* to Admin::ProductsController
|
|
||||||
# # (app/controllers/admin/products_controller.rb)
|
|
||||||
# resources :products
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
24
spec/controllers/pastes_controller_spec.rb
Normal file
24
spec/controllers/pastes_controller_spec.rb
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe PastesController do
|
||||||
|
describe "GET #index" do
|
||||||
|
it "renders the :index template" do
|
||||||
|
get :index
|
||||||
|
expect(response).to render_template("index")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "GET #new" do
|
||||||
|
it "renders the :new template" do
|
||||||
|
get :new
|
||||||
|
expect(response).to render_template("new")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "GET #edit" do
|
||||||
|
it "renders the :edit template" do
|
||||||
|
get :edit, id: 1
|
||||||
|
expect(response).to render_template("edit")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
4
spec/helpers/pastes_helper_spec.rb
Normal file
4
spec/helpers/pastes_helper_spec.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe PastesHelper do
|
||||||
|
end
|
Loading…
Reference in a new issue