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'
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.
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.
16 # See Spec::Rails::Example::ModelExample
18 # == Controller Examples
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.
22 # See Spec::Rails::Example::ControllerExample
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.
30 # See Spec::Rails::Example::ViewExample
34 # These let you specify directly methods that live in your helpers.
36 # See Spec::Rails::Example::HelperExample