One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| # config/initializers/will_paginate.rb | |
| module WillPaginate | |
| module ActionView | |
| def will_paginate(collection = nil, options = {}) | |
| options[:renderer] ||= BootstrapLinkRenderer | |
| super.try :html_safe | |
| end | |
| class BootstrapLinkRenderer < LinkRenderer |
| # Improved "puts" in Textmate's version of rspec | |
| if ENV['TM_MODE'] == 'RSpec' | |
| alias :orig_puts :puts | |
| def puts(str) | |
| str = '[nil]' if str.nil? | |
| str = '' if str.blank? | |
| url, line = caller[0].split(":") | |
| md = caller[0].match(/[\\\/]([^\\\/]*:\d+):(.*)/) | |
| link_text = md[1] | |
| title = md[2] |