Generated 2011-04-17T07:29:30-06:00

## All Files (94.44%)

15 files in total. 72 relevant lines. 68 lines covered and 4 lines missed

File | % covered | Lines | Relevant Lines | Lines covered | Lines missed
--- | --- | --- | --- | --- | ---
./app/controllers/application_controller.rb | 100.0 % | 3 | 2 | 2 | 0
./app/controllers/people_controller.rb | 90.0 % | 83 | 40 | 36 | 4
./app/helpers/application_helper.rb | 100.0 % | 2 | 1 | 1 | 0
./app/helpers/people_helper.rb | 100.0 % | 2 | 1 | 1 | 0
./app/models/person.rb | 100.0 % | 5 | 3 | 3 | 0
./config/application.rb | 100.0 % | 42 | 7 | 7 | 0
./config/boot.rb | 100.0 % | 6 | 3 | 3 | 0
./config/environment.rb | 100.0 % | 5 | 2 | 2 | 0
./config/environments/test.rb | 100.0 % | 35 | 9 | 9 | 0
./config/initializers/backtrace_silencers.rb | 100.0 % | 7 | 0 | 0 | 0
./config/initializers/inflections.rb | 100.0 % | 10 | 0 | 0 | 0
./config/initializers/mime_types.rb | 100.0 % | 5 | 0 | 0 | 0
./config/initializers/secret_token.rb | 100.0 % | 7 | 1 | 1 | 0
./config/initializers/session_store.rb | 100.0 % | 8 | 1 | 1 | 0
./config/routes.rb | 100.0 % | 60 | 2 | 2 | 0

### ./app/controllers/application_controller.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    class ApplicationController < ActionController::Base

2

    2

      protect_from_forgery

2

    3

    end

### ./app/controllers/people_controller.rb

#### 90.0 % covered

# |  | Hits
--- | --- | ---

    1

    class PeopleController < ApplicationController

2

    2

      # GET /people

    3

      # GET /people.xml

    4

      def index

2

    5

        @people = Person.all

1

    6

    7

        respond_to do |format|

1

    8

          format.html # index.html.erb

1

    9

          format.xml  { render :xml => @people }

1

    10

        end

    11

      end

    12

    13

      # GET /people/1

    14

      # GET /people/1.xml

    15

      def show

2

    16

        @person = Person.find(params[:id])

1

    17

    18

        respond_to do |format|

1

    19

          format.html # show.html.erb

1

    20

          format.xml  { render :xml => @person }

1

    21

        end

    22

      end

    23

    24

      # GET /people/new

    25

      # GET /people/new.xml

    26

      def new

2

    27

        @person = Person.new

1

    28

    29

        respond_to do |format|

1

    30

          format.html # new.html.erb

1

    31

          format.xml  { render :xml => @person }

1

    32

        end

    33

      end

    34

    35

      # GET /people/1/edit

    36

      def edit

2

    37

        @person = Person.find(params[:id])

1

    38

      end

    39

    40

      # POST /people

    41

      # POST /people.xml

    42

      def create

2

    43

        @person = Person.new(params[:person])

1

    44

    45

        respond_to do |format|

1

    46

          if @person.save

1

    47

            format.html { redirect_to(@person, :notice => 'Person was successfully created.') }

2

    48

            format.xml  { render :xml => @person, :status => :created, :location => @person }

1

    49

          else

    50

            format.html { render :action => "new" }

0

    51

            format.xml  { render :xml => @person.errors, :status => :unprocessable_entity }

0

    52

          end

    53

        end

    54

      end

    55

    56

      # PUT /people/1

    57

      # PUT /people/1.xml

    58

      def update

2

    59

        @person = Person.find(params[:id])

1

    60

    61

        respond_to do |format|

1

    62

          if @person.update_attributes(params[:person])

1

    63

            format.html { redirect_to(@person, :notice => 'Person was successfully updated.') }

2

    64

            format.xml  { head :ok }

1

    65

          else

    66

            format.html { render :action => "edit" }

0

    67

            format.xml  { render :xml => @person.errors, :status => :unprocessable_entity }

0

    68

          end

    69

        end

    70

      end

    71

    72

      # DELETE /people/1

    73

      # DELETE /people/1.xml

    74

      def destroy

2

    75

        @person = Person.find(params[:id])

1

    76

        @person.destroy

1

    77

    78

        respond_to do |format|

1

    79

          format.html { redirect_to(people_url) }

2

    80

          format.xml  { head :ok }

1

    81

        end

    82

      end

    83

    end

### ./app/helpers/application_helper.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    module ApplicationHelper

2

    2

    end

### ./app/helpers/people_helper.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    module PeopleHelper

2

    2

    end

### ./app/models/person.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    class Person < ActiveRecord::Base

2

    2

      def full_name

2

    3

        [first_name, last_name].join(" ")

1

    4

      end

    5

    end

### ./config/application.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    require File.expand_path('../boot', __FILE__)

2

    2

    3

    require 'rails/all'

2

    4

    5

    # If you have a Gemfile, require the gems listed there, including any gems

    6

    # you've limited to :test, :development, or :production.

    7

    Bundler.require(:default, Rails.env) if defined?(Bundler)

2

    8

    9

    module TestCoverage

2

    10

      class Application < Rails::Application

2

    11

        # Settings in config/environments/* take precedence over those specified here.

    12

        # Application configuration should go into files in config/initializers

    13

        # -- all .rb files in that directory are automatically loaded.

    14

    15

        # Custom directories with classes and modules you want to be autoloadable.

    16

        # config.autoload_paths += %W(#{config.root}/extras)

    17

    18

        # Only load the plugins named here, in the order given (default is alphabetical).

    19

        # :all can be used as a placeholder for all plugins not explicitly named.

    20

        # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    21

    22

        # Activate observers that should always be running.

    23

        # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    24

    25

        # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.

    26

        # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.

    27

        # config.time_zone = 'Central Time (US & Canada)'

    28

    29

        # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.

    30

        # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]

    31

        # config.i18n.default_locale = :de

    32

    33

        # JavaScript files you want as :defaults (application.js is always included).

    34

        # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)

    35

    36

        # Configure the default encoding used in templates for Ruby 1.9.

    37

        config.encoding = "utf-8"

2

    38

    39

        # Configure sensitive parameters which will be filtered from the log file.

    40

        config.filter_parameters += [:password]

2

    41

      end

    42

    end

### ./config/boot.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    require 'rubygems'

2

    2

    3

    # Set up gems listed in the Gemfile.

    4

    ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

2

    5

    6

    require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

2

### ./config/environment.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Load the rails application

    2

    require File.expand_path('../application', __FILE__)

2

    3

    4

    # Initialize the rails application

    5

    TestCoverage::Application.initialize!

2

### ./config/environments/test.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    TestCoverage::Application.configure do

2

    2

      # Settings specified here will take precedence over those in config/application.rb

    3

    4

      # The test environment is used exclusively to run your application's

    5

      # test suite.  You never need to work with it otherwise.  Remember that

    6

      # your test database is "scratch space" for the test suite and is wiped

    7

      # and recreated between test runs.  Don't rely on the data there!

    8

      config.cache_classes = true

2

    9

    10

      # Log error messages when you accidentally call methods on nil.

    11

      config.whiny_nils = true

2

    12

    13

      # Show full error reports and disable caching

    14

      config.consider_all_requests_local       = true

2

    15

      config.action_controller.perform_caching = false

2

    16

    17

      # Raise exceptions instead of rendering exception templates

    18

      config.action_dispatch.show_exceptions = false

2

    19

    20

      # Disable request forgery protection in test environment

    21

      config.action_controller.allow_forgery_protection    = false

2

    22

    23

      # Tell Action Mailer not to deliver emails to the real world.

    24

      # The :test delivery method accumulates sent emails in the

    25

      # ActionMailer::Base.deliveries array.

    26

      config.action_mailer.delivery_method = :test

2

    27

    28

      # Use SQL instead of Active Record's schema dumper when creating the test database.

    29

      # This is necessary if your schema can't be completely dumped by the schema dumper,

    30

      # like if you have constraints or database-specific column types

    31

      # config.active_record.schema_format = :sql

    32

    33

      # Print deprecation notices to the stderr

    34

      config.active_support.deprecation = :stderr

2

    35

    end

### ./config/initializers/backtrace_silencers.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Be sure to restart your server when you modify this file.

    2

    3

    # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

    4

    # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }

    5

    6

    # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.

    7

    # Rails.backtrace_cleaner.remove_silencers!

### ./config/initializers/inflections.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Be sure to restart your server when you modify this file.

    2

    3

    # Add new inflection rules using the following format

    4

    # (all these examples are active by default):

    5

    # ActiveSupport::Inflector.inflections do |inflect|

    6

    #   inflect.plural /^(ox)$/i, '\1en'

    7

    #   inflect.singular /^(ox)en/i, '\1'

    8

    #   inflect.irregular 'person', 'people'

    9

    #   inflect.uncountable %w( fish sheep )

    10

    # end

### ./config/initializers/mime_types.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Be sure to restart your server when you modify this file.

    2

    3

    # Add new mime types for use in respond_to blocks:

    4

    # Mime::Type.register "text/richtext", :rtf

    5

    # Mime::Type.register_alias "text/html", :iphone

### ./config/initializers/secret_token.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Be sure to restart your server when you modify this file.

    2

    3

    # Your secret key for verifying the integrity of signed cookies.

    4

    # If you change this key, all old signed cookies will become invalid!

    5

    # Make sure the secret is at least 30 characters and all random,

    6

    # no regular words or you'll be exposed to dictionary attacks.

    7

    TestCoverage::Application.config.secret_token = 'eb411bcfa15c47de79a2ac867f43fdecb557526940ea55ba539a84abdbf8c86948fc0d5ccb01dff17bb9384bc0d2dcea527b3eeffb0d47f61ce293c54e3a1756'

2

### ./config/initializers/session_store.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    # Be sure to restart your server when you modify this file.

    2

    3

    TestCoverage::Application.config.session_store :cookie_store, :key => '_test_coverage_session'

2

    4

    5

    # Use the database for sessions instead of the cookie-based default,

    6

    # which shouldn't be used to store highly confidential information

    7

    # (create the session table with "rails generate session_migration")

    8

    # TestCoverage::Application.config.session_store :active_record_store

### ./config/routes.rb

#### 100.0 % covered

# |  | Hits
--- | --- | ---

    1

    TestCoverage::Application.routes.draw do

2

    2

      resources :people

2

    3

    4

      # The priority is based upon order of creation:

    5

      # first created -> highest priority.

    6

    7

      # Sample of regular route:

    8

      #   match 'products/:id' => 'catalog#view'

    9

      # Keep in mind you can assign values other than :controller and :action

    10

    11

      # Sample of named route:

    12

      #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase

    13

      # This route can be invoked with purchase_url(:id => product.id)

    14

    15

      # Sample resource route (maps HTTP verbs to controller actions automatically):

    16

      #   resources :products

    17

    18

      # Sample resource route with options:

    19

      #   resources :products do

    20

      #     member do

    21

      #       get 'short'

    22

      #       post 'toggle'

    23

      #     end

    24

      #

    25

      #     collection do

    26

      #       get 'sold'

    27

      #     end

    28

      #   end

    29

    30

      # Sample resource route with sub-resources:

    31

      #   resources :products do

    32

      #     resources :comments, :sales

    33

      #     resource :seller

    34

      #   end

    35

    36

      # Sample resource route with more complex sub-resources

    37

      #   resources :products do

    38

      #     resources :comments

    39

      #     resources :sales do

    40

      #       get 'recent', :on => :collection

    41

      #     end

    42

      #   end

    43

    44

      # Sample resource route within a namespace:

    45

      #   namespace :admin do

    46

      #     # Directs /admin/products/* to Admin::ProductsController

    47

      #     # (app/controllers/admin/products_controller.rb)

    48

      #     resources :products

    49

      #   end

    50

    51

      # You can have the root of your site routed with "root"

    52

      # just remember to delete public/index.html.

    53

      # root :to => "welcome#index"

    54

    55

      # See how all your routes lay out with "rake routes"

    56

    57

      # This is a legacy wild controller route that's not recommended for RESTful applications.

    58

      # Note: This route will make all actions in every controller accessible via GET requests.

    59

      # match ':controller(/:action(/:id(.:format)))'

    60

    end