Upgraded Rails
[monkeycharger.git] / vendor / plugins / rspec / rspec_on_rails / lib / spec / rails / example.rb
blob6e9c77c92d7beac1d82f3cd81907387da349f252
1 dir = File.dirname(__FILE__)
3 require 'spec/rails/example/ivar_proxy'
4 require 'spec/rails/example/assigns_hash_proxy'
5 require 'spec/rails/example/behaviour'
7 module Spec
8   module Rails
9     # Spec::Rails::Example extends Spec::Example (RSpec's core Example module) to provide
10     # Rails-specific contexts for describing Rails Models, Views, Controllers and Helpers.
11     #
12     # == Model Examples
13     #
14     # These are the equivalent of unit tests in Rails' built in testing. Ironically (for the traditional TDD'er) these are the only specs that we feel should actually interact with the database.
15     #
16     # See Spec::Rails::Example::ModelExample
17     #
18     # == Controller Examples
19     #
20     # These align somewhat with functional tests in rails, except that they do not actually render views (though you can force rendering of views if you prefer). Instead of setting expectations about what goes on a page, you set expectations about what templates get rendered.
21     #
22     # See Spec::Rails::Example::ControllerExample
23     #
24     # == View Examples
25     #
26     # This is the other half of Rails functional testing. View specs allow you to set up assigns and render
27     # a template. By assigning mock model data, you can specify view behaviour with no dependency on a database
28     # or your real models.
29     #
30     # See Spec::Rails::Example::ViewExample
31     #
32     # == Helper Examples
33     #
34     # These let you specify directly methods that live in your helpers.
35     #
36     # See Spec::Rails::Example::HelperExample
37     module Example
38     end
39   end
40 end