<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,3 @@
 module Remarkable
-  VERSION = '3.1.4' unless self.const_defined?('VERSION')
+  VERSION = '3.1.6' unless self.const_defined?(:VERSION)
 end</diff>
      <filename>remarkable/lib/remarkable/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 module Remarkable
   module ActiveRecord
     class Base &lt; Remarkable::Base
+      I18N_COLLECTION = [ :attributes, :associations ]
 
       # Provides a way to send options to all ActiveRecord matchers.
       #
@@ -206,12 +207,14 @@ module Remarkable
             @spec.send(:described_class)
           end
 
-          if RAILS_I18N &amp;&amp; described_class.respond_to?(:human_attribute_name) &amp;&amp; self.class.matcher_arguments[:collection]
+          if i18n_collection? &amp;&amp; described_class.respond_to?(:human_attribute_name)
             options = {}
 
             collection_name = self.class.matcher_arguments[:collection].to_sym
             if collection = instance_variable_get(&quot;@#{collection_name}&quot;)
-              collection.map!{|attr| described_class.human_attribute_name(attr.to_s, :locale =&gt; Remarkable.locale).downcase }
+              collection = collection.map do |attr|
+                described_class.human_attribute_name(attr.to_s, :locale =&gt; Remarkable.locale).downcase
+              end
               options[collection_name] = array_to_sentence(collection)
             end
 
@@ -227,6 +230,12 @@ module Remarkable
           end
         end
 
+        # Returns true if the given collection should be translated.
+        #
+        def i18n_collection? #:nodoc:
+          RAILS_I18N &amp;&amp; I18N_COLLECTION.include?(self.class.matcher_arguments[:collection])
+        end
+
     end
   end
 end</diff>
      <filename>remarkable_activerecord/lib/remarkable_activerecord/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -45,6 +45,19 @@ module Remarkable
 
       # Ensures that the attribute can be set on mass update.
       #
+      # Beware that when used in the negative form, this matcher fails if any of
+      # the values fail. For example, let's assume we have a accessible and a
+      # protected attribute called :accessible and :protected. The following
+      # assertion WILL pass:
+      #
+      #   should_not_allow_mass_assignment_of :protected, :accessible
+      #
+      # If you want to assert that all values fail, you have to do:
+      #
+      #   %w(first_protected second_protected).each do |protected|
+      #     should_not_allow_mass_assignment_of protected
+      #   end
+      #
       # == Examples
       #
       #   should_allow_mass_assignment_of :email, :name</diff>
      <filename>remarkable_activerecord/lib/remarkable_activerecord/matchers/allow_mass_assignment_of_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,8 +65,17 @@ module Remarkable
 
       # Ensures that the attribute can be set to the given values.
       #
-      # Note: this matcher accepts at once just one attribute to test.
-      # Note: this matcher is also aliased as &quot;validate_format_of&quot;.
+      # Beware that when used in the negative form, this matcher fails if any of
+      # the values fail. For example, let's assume we have a valid and invalid
+      # value called &quot;valid&quot; and &quot;invalid&quot;. The following assertion WILL pass:
+      #
+      #   should_not_allow_values_for :attribute, &quot;valid&quot;, &quot;invalid&quot;
+      #
+      # If you want to assert that all values fail, you have to do:
+      #
+      #   %w(first_invalid second_invalid).each do |invalid|
+      #     should_not_allow_values_for invalid
+      #   end
       #
       # == Options
       #
@@ -78,10 +87,7 @@ module Remarkable
       # == Examples
       #
       #   should_allow_values_for :isbn, &quot;isbn 1 2345 6789 0&quot;, &quot;ISBN 1-2345-6789-0&quot;
-      #   should_not_allow_values_for :isbn, &quot;bad 1&quot;, &quot;bad 2&quot;
-      #
       #   it { should allow_values_for(:isbn, &quot;isbn 1 2345 6789 0&quot;, &quot;ISBN 1-2345-6789-0&quot;) }
-      #   it { should_not allow_values_for(:isbn, &quot;bad 1&quot;, &quot;bad 2&quot;) }
       #
       def allow_values_for(attribute, *args, &amp;block)
         options = args.extract_options!</diff>
      <filename>remarkable_activerecord/lib/remarkable_activerecord/matchers/allow_values_for_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module Remarkable
         optionals :uniq, :readonly, :validate, :autosave, :polymorphic, :counter_cache, :default =&gt; true
 
         collection_assertions :association_exists?, :macro_matches?, :through_exists?, :source_exists?,
-                              :join_table_exists?, :foreign_key_exists?, :polymorphic_exists?,
+                              :klass_exists?, :join_table_exists?, :foreign_key_exists?, :polymorphic_exists?,
                               :counter_cache_exists?, :options_match?
 
         protected
@@ -32,6 +32,13 @@ module Remarkable
             reflection.source_reflection rescue false
           end
 
+          # Polymorphic associations does not have a klass.
+          #
+          def klass_exists?
+            return true if @options[:polymorphic]
+            reflection.klass rescue nil
+          end
+
           # has_and_belongs_to_many only works if the tables are in the same
           # database, so we always look for the table in the subject connection.
           #
@@ -74,11 +81,18 @@ module Remarkable
             @reflection ||= subject_class.reflect_on_association(@association.to_sym)
           end
 
-          # Rescue nil to avoid raising errors in invalid through associations
+          def subject_table_name
+            subject_class.table_name.to_s
+          end
+
           def reflection_class_name
             reflection.class_name.to_s rescue nil
           end
 
+          def reflection_table_name
+            reflection.klass.table_name.to_s rescue nil
+          end
+
           def reflection_foreign_key
             reflection.primary_key_name.to_s
           end
@@ -107,9 +121,9 @@ module Remarkable
             elsif reflection.macro == :has_and_belongs_to_many
               reflection.options[:join_table]
             elsif reflection.macro == :belongs_to
-              subject_class.table_name
+              subject_table_name
             else
-              reflection.klass.table_name
+              reflection_table_name
             end
           end
 
@@ -132,14 +146,14 @@ module Remarkable
             if @subject &amp;&amp; reflection
               options.merge!(
                 :actual_macro         =&gt; Remarkable.t(reflection.macro, :scope =&gt; matcher_i18n_scope, :default =&gt; reflection.macro.to_s),
-                :subject_table        =&gt; subject_class.table_name.inspect,
-                :reflection_table     =&gt; reflection.klass.table_name.inspect,
+                :subject_table        =&gt; subject_table_name.inspect,
+                :reflection_table     =&gt; reflection_table_name.inspect,
                 :foreign_key_table    =&gt; foreign_key_table.inspect,
                 :polymorphic_column   =&gt; reflection_foreign_key.sub(/_id$/, '_type').inspect,
                 :counter_cache_column =&gt; reflection.counter_cache_column.to_s.inspect,
                 :join_table           =&gt; reflection.options[:join_table].inspect,
                 :foreign_key          =&gt; reflection_foreign_key.inspect
-              ) rescue nil # rescue to allow specs to run properly
+              )
             end
 
             options</diff>
      <filename>remarkable_activerecord/lib/remarkable_activerecord/matchers/association_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,10 +53,11 @@ en:
         has_one: have one
         description: &quot;{{macro}} {{associations}}&quot;
         expectations:
-          association_exists: &quot;{{subject_name}} records {{macro}} {{association}}, got no association&quot;
+          association_exists: &quot;{{subject_name}} records {{macro}} {{association}}, but the association does not exist&quot;
           macro_matches: &quot;{{subject_name}} records {{macro}} {{association}}, got {{subject_name}} records {{actual_macro}} {{association}}&quot;
           through_exists: &quot;{{subject_name}} records {{macro}} {{association}} through {{through}}, through association does not exist&quot;
           source_exists: &quot;{{subject_name}} records {{macro}} {{association}} through {{through}}, source association does not exist&quot;
+          klass_exists: &quot;{{subject_name}} records {{macro}} {{association}}, but the association class does not exist&quot;
           join_table_exists: &quot;join table {{join_table}} to exist, but does not&quot;
           foreign_key_exists: &quot;foreign key {{foreign_key}} to exist on {{foreign_key_table}}, but does not&quot;
           polymorphic_exists: &quot;{{subject_table}} to have {{polymorphic_column}} as column, but does not&quot;</diff>
      <filename>remarkable_activerecord/locale/en.yml</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,13 @@ describe 'association_matcher' do
     def define_and_validate(options={})
       columns = options.delete(:association_columns) || { :projects_count =&gt; :integer }
       define_model :company, columns
+      define_model :super_company, columns
 
       columns = options.delete(:model_columns) || { :company_id =&gt; :integer, :company_type =&gt; :string }
       @model = define_model :project, columns do
         belongs_to :company, options
+        belongs_to :unknown
+        belongs_to :accountable, :polymorphic =&gt; true
       end
 
       belong_to :company
@@ -47,7 +50,7 @@ describe 'association_matcher' do
         define_and_validate
         matcher = belong_to('whatever')
         matcher.matches?(@model)
-        matcher.failure_message.should == 'Expected Project records belong to whatever, got no association'
+        matcher.failure_message.should == 'Expected Project records belong to whatever, but the association does not exist'
       end
 
       it 'should set macro_matches? message' do
@@ -57,6 +60,13 @@ describe 'association_matcher' do
         matcher.failure_message.should == 'Expected Project records have one company, got Project records belong to company'
       end
 
+      it 'should set klass_exists? message' do
+        define_and_validate
+        matcher = belong_to('unknown')
+        matcher.matches?(@model)
+        matcher.failure_message.should == 'Expected Project records belong to unknown, but the association class does not exist'
+      end
+
       it 'should set foreign_key_exists? message' do
         matcher = define_and_validate(:model_columns =&gt; {})
         matcher.matches?(@model)
@@ -93,6 +103,7 @@ describe 'association_matcher' do
         before(:each){ define_and_validate }
 
         it { should belong_to(:company) }
+        it { should_not belong_to(:unknown) }
         it { should_not belong_to(:project) }
         it { should_not have_one(:company) }
         it { should_not have_many(:company) }
@@ -135,6 +146,11 @@ describe 'association_matcher' do
         it { should_not define_and_validate(:association_columns =&gt; { :association_count =&gt; :integer }).counter_cache(:association_count) }
       end
 
+      describe &quot;with polymorphic option&quot; do
+        before(:each){ define_and_validate(:model_columns =&gt; {:accountable_id =&gt; :integer, :accountable_type =&gt; :string}) }
+        it { should belong_to(:accountable).polymorphic }
+      end
+
       create_optional_boolean_specs(:readonly, self)
       create_optional_boolean_specs(:validate, self)
       create_optional_boolean_specs(:autosave, self) if RAILS_VERSION =~ /^2.3/
@@ -158,6 +174,7 @@ describe 'association_matcher' do
         m.foreign_key = :company_id
       end
 
+      should_not_belong_to :unknown
       should_not_belong_to :project
       should_not_have_one  :company
       should_not_have_many :companies
@@ -174,6 +191,7 @@ describe 'association_matcher' do
     # Defines a model, create a validation and returns a raw matcher
     def define_and_validate(options={})
       define_model :label
+      define_model :super_label
 
       columns = options.delete(:association_columns) || [ :label_id, :project_id ]
       create_table(options.delete(:association_table) || :labels_projects) do |table|
@@ -209,7 +227,7 @@ describe 'association_matcher' do
         define_and_validate
         matcher = have_and_belong_to_many('whatever')
         matcher.matches?(@model)
-        matcher.failure_message.should == 'Expected Project records have and belong to many whatever, got no association'
+        matcher.failure_message.should == 'Expected Project records have and belong to many whatever, but the association does not exist'
       end
 
       it 'should set macro_matches? message' do
@@ -365,7 +383,7 @@ describe 'association_matcher' do
         define_and_validate
         matcher = have_many('whatever')
         matcher.matches?(@model)
-        matcher.failure_message.should == 'Expected Project records have many whatever, got no association'
+        matcher.failure_message.should == 'Expected Project records have many whatever, but the association does not exist'
       end
 
       it 'should set macro_matches? message' do
@@ -503,6 +521,7 @@ describe 'association_matcher' do
       @model = define_model :project, options.delete(:model_columns) || {} do
         has_many :project_managers unless options.delete(:skip_through)
         has_one  :manager, options
+        has_one  :unknown
       end
 
       have_one :manager
@@ -524,7 +543,14 @@ describe 'association_matcher' do
         define_and_validate
         matcher = have_one('whatever')
         matcher.matches?(@model)
-        matcher.failure_message.should == 'Expected Project records have one whatever, got no association'
+        matcher.failure_message.should == 'Expected Project records have one whatever, but the association does not exist'
+      end
+
+      it 'should set klass_exists? message' do
+        define_and_validate
+        matcher = have_one('unknown')
+        matcher.matches?(@model)
+        matcher.failure_message.should == 'Expected Project records have one unknown, but the association class does not exist'
       end
 
       it 'should set macro_matches? message' do
@@ -571,6 +597,7 @@ describe 'association_matcher' do
         before(:each){ define_and_validate }
 
         it { should have_one(:manager) }
+        it { should_not have_one(:unknown) }
         it { should_not belong_to(:manager) }
         it { should_not have_many(:managers) }
         it { should_not have_and_belong_to_many(:managers) }
@@ -635,6 +662,7 @@ describe 'association_matcher' do
         m.through = :project_managers
       end
 
+      should_not_have_one :unknown
       should_not_have_one :manager, :validate =&gt; false
       should_not_have_one :manager, :through =&gt; :another_thing
     end</diff>
      <filename>remarkable_activerecord/spec/association_matcher_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -174,10 +174,11 @@ en:
         has_one: have one
         description: &quot;{{macro}} {{associations}}&quot;
         expectations:
-          association_exists: &quot;{{subject_name}} records {{macro}} {{association}}, got no association&quot;
+          association_exists: &quot;{{subject_name}} records {{macro}} {{association}}, but the association does not exist&quot;
           macro_matches: &quot;{{subject_name}} records {{macro}} {{association}}, got {{subject_name}} records {{actual_macro}} {{association}}&quot;
           through_exists: &quot;{{subject_name}} records {{macro}} {{association}} through {{through}}, through association does not exist&quot;
           source_exists: &quot;{{subject_name}} records {{macro}} {{association}} through {{through}}, source association does not exist&quot;
+          klass_exists: &quot;{{subject_name}} records {{macro}} {{association}}, but the association class does not exist&quot;
           join_table_exists: &quot;join table {{join_table}} to exist, but does not&quot;
           foreign_key_exists: &quot;foreign key {{foreign_key}} to exist on {{foreign_key_table}}, but does not&quot;
           polymorphic_exists: &quot;{{subject_table}} to have {{polymorphic_column}} as column, but does not&quot;</diff>
      <filename>remarkable_i18n/en.yml</filename>
    </modified>
    <modified>
      <diff>@@ -174,10 +174,11 @@ pt-BR:
         has_one: possuir um(a)
         description: &quot;{{macro}} {{associations}}&quot;
         expectations:
-          association_exists: &quot;{{subject_name}} pudesse {{macro}} {{association}}, obtive nenhuma associa&#231;&#227;o&quot;
+          association_exists: &quot;{{subject_name}} pudesse {{macro}} {{association}}, mas associa&#231;&#227;o n&#227;o existe&quot;
           macro_matches: &quot;{{subject_name}} pudesse {{macro}} {{association}}, obtive que {{subject_name}} deve {{actual_macro}} {{association}}&quot;
           through_exists: &quot;{{subject_name}} pudesse {{macro}} {{association}} atrav&#233;s de {{through}}, obtive que \&quot;through_association\&quot; n&#227;o existe&quot;
           source_exists: &quot;{{subject_name}} pudesse {{macro}} {{association}} atrav&#233;s de {{through}}, obtive que \&quot;source association\&quot; n&#227;o existe&quot;
+          klass_exists: &quot;{{subject_name}} records {{macro}} {{association}}, mas a classe da associa&#231;&#227;o n&#227;o existe&quot;
           join_table_exists: &quot;tabela de jun&#231;&#227;o {{join_table}} existisse, mas n&#227;o existe&quot;
           foreign_key_exists: &quot;chave estrangeira {{foreign_key}} existisse em {{foreign_key_table}}, mas n&#227;o existe&quot;
           polymorphic_exists: &quot;{{subject_table}} tivesse {{polymorphic_column}} como coluna, mas n&#227;o tem&quot;</diff>
      <filename>remarkable_i18n/pt-BR.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,11 @@
+* Allow mock model class to be set using :as option.
+
+* [DEPRECATION] By default all matchers perform expectations, use with_stubs =&gt; true
+  if you want otherwise.
+
+* [DEPRECATION] mock_models now creates model_proc instead of mock_model.
+  Altough this won't fire any deprecation warning, all the documentation was changed.
+
 * assert_valid_keys on expects
 
 * mock_models now creates a second class method to be used on the index action [#71]
@@ -70,10 +78,10 @@ specs for a create action rewritten like this:
     mock_models :task
 
     describe :post =&gt; :create, :task =&gt; { :these =&gt; 'params' } do
-      expects :new,  :on =&gt; Task, with =&gt; {'these' =&gt; 'params'}, :returns =&gt; mock_task
+      expects :new,  :on =&gt; Task, with =&gt; {'these' =&gt; 'params'}, :returns =&gt; task_proc
       expects :save, :on =&gt; mock_task, :returns =&gt; true
 
-      should_assign_to :task, :with =&gt; mock_task
+      should_assign_to :task, :with =&gt; task_proc
       should_redirect_to { task_url(mock_task) }
     end
   end</diff>
      <filename>remarkable_rails/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -65,17 +65,17 @@ An equivalent in remarkable would be:
     mock_models :task
 
     describe :post =&gt; :create, :task =&gt; { :these =&gt; 'params' } do
-      expects :new,  :on =&gt; Task, :with =&gt; {'these' =&gt; 'params'}, :returns =&gt; mock_task
-      expects :save, :on =&gt; mock_task, :returns =&gt; true
+      expects :new,  :on =&gt; Task, :with =&gt; {'these' =&gt; 'params'}, :returns =&gt; task_proc
+      expects :save, :on =&gt; task_proc, :returns =&gt; true
 
-      should_assign_to :task, :with =&gt; mock_task
-      should_redirect_to { task_url(mock_task) }
+      should_assign_to :task, :with =&gt; task_proc
+      should_redirect_to { task_url(task_proc) }
     end
   end
 
-It automatically performs the action before running each macro. In assign_to,
-it executes the expects as expectations (:should_receive), and in redirect_to
-it executes the expects as stubs (:stub!), just as above.
+It automatically performs the action before running each macro. It executes the
+expects as expectations (:should_receive), but you can supply :with_stubs =&gt; true
+if you want it to be executed with stubs.
 
 There are also params and mime methods:
 </diff>
      <filename>remarkable_rails/README</filename>
    </modified>
    <modified>
      <diff>@@ -22,7 +22,7 @@ module Remarkable
           elsif @options.key?(:with_expectations)
             @options[:with_expectations]
           else
-            false
+            true
           end
         end
 </diff>
      <filename>remarkable_rails/lib/remarkable_rails/action_controller/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,27 +36,16 @@ module Remarkable
     #     assigns(:project).should == mock_project
     #   end
     #
-    # On the other hand, should render template is doing something like this:
-    #
-    #   it 'should render template show' do
-    #     Project.stub!(:find).and_return(mock_project)
-    #     get :show, :id =&gt; '37'
-    #     response.should render_template('show')
-    #   end
-    #
-    # Now comes the first question: how each macro knows if they should perform
-    # expectations or stubs?
-    #
-    # By default, only should_assign_to macro performs expectations. You can change
+    # By default, all macros perform expectations. You can change
     # this behavior sending :with_stubs or :with_expectations as options:
     #
     #   should_assign_to       :project, :with_stubs =&gt; true
-    #   should_render_template 'show', :with_expectations =&gt; true
+    #   should_render_template 'show', :with_expectations =&gt; false
     #
     # This also works in the rspec way:
     #
-    #   it { should assign_to(:project).with_stubs            }
-    #   it { should render_template('show').with_expectations }
+    #   it { should assign_to(:project).with_stubs                   }
+    #   it { should render_template('show').with_expectations(false) }
     #
     # == Attention!
     #
@@ -84,12 +73,12 @@ module Remarkable
     #
     # And it creates:
     #
-    #   def self.mock_project
+    #   def self.project_proc
     #     proc { mock_project }
     #   end
     #
     #   # To be used on index actions
-    #   def self.mock_projects
+    #   def self.projects_proc
     #     proc { [mock_project] }
     #   end
     #
@@ -104,8 +93,8 @@ module Remarkable
     #
     # For:
     #
-    #    expects :find, :on =&gt; Project, :with =&gt; '37', :returns =&gt; mock_project
-    #    should_assign_to :project, :with =&gt; mock_project
+    #    expects :find, :on =&gt; Project, :with =&gt; '37', :returns =&gt; project_proc
+    #    should_assign_to :project, :with =&gt; project_proc
     #
     # = Give me more!
     #
@@ -122,11 +111,11 @@ module Remarkable
     #     params :project_id =&gt; '42' #=&gt; define params for all requests
     #
     #     # Those two expectations get inherited in all describe groups below
-    #     expects :find_by_title, :on =&gt; Project, :with =&gt; '42', :returns =&gt; mock_project
+    #     expects :find_by_title, :on =&gt; Project, :with =&gt; '42', :returns =&gt; project_proc
     #     expects :tasks, :and_return =&gt; Task
     #
     #     describe :get =&gt; :show, :id =&gt; '37' do
-    #       expects :find, :with =&gt; '37', :and_return =&gt; mock_task
+    #       expects :find, :with =&gt; '37', :and_return =&gt; task_proc
     #
     #       should_assign_to :project, :task
     #       should_render_template 'show'
@@ -140,7 +129,7 @@ module Remarkable
     # expectations with run_action!, run_expectations! and run_stubs!. Examples:
     #
     #   describe :get =&gt; :new do
-    #     expects :new, :on =&gt; Project, :returns =&gt; mock_project
+    #     expects :new, :on =&gt; Project, :returns =&gt; project_proc
     #
     #     it &quot;should do something different&quot; do
     #       run_action!
@@ -223,9 +212,9 @@ module Remarkable
         #
         # == Example
         #
-        #   expects :new, :on =&gt; Project, :returns =&gt; :mock_project, :times =&gt; 2
+        #   expects :new, :on =&gt; Project, :returns =&gt; :project_proc, :times =&gt; 2
         #
-        #   expects :new, :find, :on =&gt; Project, :returns =&gt; :mock_project
+        #   expects :new, :find, :on =&gt; Project, :returns =&gt; :project_proc
         #
         #   expects :human_attribute_name, :on =&gt; Project, :with =&gt; :title do |attr|
         #     attr.to_s.humanize
@@ -416,6 +405,12 @@ module Remarkable
         #
         # == Options
         #
+        # * &lt;tt&gt;:as&lt;/tt&gt; -  Used to set the model . For example, if you have
+        #   Admin::Task model, you have to tell the name of the class to be
+        #   mocked:
+        #
+        #      mock_models :admin_task, :as =&gt; &quot;Admin::Task&quot;
+        #
         # * &lt;tt&gt;:class_method&lt;/tt&gt; - When set to false, does not create the
         #   class method which returns a proc.
         #
@@ -429,12 +424,12 @@ module Remarkable
         #
         # Will create one instance and two class mock methods for you:
         #
-        #   def self.mock_project
+        #   def self.project_proc
         #     proc { mock_project }
         #   end
         #
         #   # To be used on index actions
-        #   def self.mock_projects
+        #   def self.projects_procs
         #     proc { [ mock_project ] }
         #   end
         #
@@ -451,16 +446,26 @@ module Remarkable
 
           models.each do |model|
             model = model.to_s
-            self.class_eval &lt;&lt;-METHOD
-              #{&quot;def self.mock_#{model}; proc { mock_#{model} }; end&quot;               if options[:class_method]}
-              #{&quot;def self.mock_#{model.pluralize}; proc { [ mock_#{model} ] }; end&quot; if options[:class_method]}
+            klass = options[:as] || model.classify
+
+            if options[:class_method]
+              (class &lt;&lt; self; self; end).class_eval &lt;&lt;-METHOD
+                def #{model}_proc; proc { mock_#{model} }; end
+                def #{model.pluralize}_proc; proc { [ mock_#{model} ] }; end
 
+                alias :mock_#{model} :#{model}_proc
+                alias :mock_#{model.pluralize} :#{model.pluralize}_proc
+              METHOD
+            end
+
+            self.class_eval &lt;&lt;-METHOD
               def mock_#{model}(stubs={})
-                @#{model} ||= mock_model(#{model.classify}, stubs)
+                @#{model} ||= mock_model(#{klass}, stubs)
               end
             METHOD
           end
         end
+        alias :mock_model :mock_models
 
       end
 </diff>
      <filename>remarkable_rails/lib/remarkable_rails/action_controller/macro_stubs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,8 +11,6 @@ module Remarkable
 
         before_assert :evaluate_expected_value
 
-        default_options :with_expectations =&gt; true
-
         protected
 
           def assigned_value?</diff>
      <filename>remarkable_rails/lib/remarkable_rails/action_controller/matchers/assign_to_matcher.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,21 +11,29 @@ describe 'MacroStubs' do
 
   describe 'mock_models' do
     before(:each) do
-      self.class.metaclass.send(:undef_method, :mock_projects) if self.class.respond_to?(:mock_projects)
-      self.class.metaclass.send(:undef_method, :mock_project)  if self.class.respond_to?(:mock_project)
+      self.class.metaclass.send(:undef_method, :projects_proc) if self.class.respond_to?(:projects_proc)
+      self.class.metaclass.send(:undef_method, :project_proc)  if self.class.respond_to?(:project_proc)
       self.class.send(:undef_method, :mock_project)            if self.respond_to?(:mock_project)
     end
 
-    it 'should create a class singular mock method' do
+    it 'should alias model_proc to mock_model' do
       self.class.respond_to?(:mock_project).should be_false
+      self.class.respond_to?(:mock_projects).should be_false
       self.class.mock_models :project
       self.class.respond_to?(:mock_project).should be_true
+      self.class.respond_to?(:mock_projects).should be_true
     end
 
-    it 'should create a class plural mock method' do
-      self.class.respond_to?(:mock_projects).should be_false
+    it 'should create a class singular proc method' do
+      self.class.respond_to?(:project_proc).should be_false
       self.class.mock_models :project
-      self.class.respond_to?(:mock_projects).should be_true
+      self.class.respond_to?(:project_proc).should be_true
+    end
+
+    it 'should create a class plural proc method' do
+      self.class.respond_to?(:projects_proc).should be_false
+      self.class.mock_models :project
+      self.class.respond_to?(:projects_proc).should be_true
     end
 
     it 'should create an instance mock method' do
@@ -35,15 +43,22 @@ describe 'MacroStubs' do
     end
 
     it 'should create just an instance method when :class_method is false' do
-      self.class.respond_to?(:mock_project).should be_false
+      self.class.respond_to?(:project_proc).should be_false
       self.respond_to?(:mock_project).should be_false
       self.class.mock_models :project, :class_method =&gt; false
-      self.class.respond_to?(:mock_project).should be_false
+      self.class.respond_to?(:project_proc).should be_false
       self.respond_to?(:mock_project).should be_true
     end
 
-    it 'should create procs which evals to a mock dynamically' do
-      proc = self.class.mock_task
+    it 'should allow the mock class to be set' do
+      self.class.mock_model :project, :as =&gt; &quot;::Admin::Project&quot;
+      lambda{
+        mock_project
+      }.should raise_error(NameError, &quot;uninitialized constant Admin&quot;)
+    end
+
+    it 'should create procs which evals to a mock' do
+      proc = self.class.task_proc
       proc.should be_kind_of(Proc)
 
       @task.should be_nil
@@ -51,8 +66,8 @@ describe 'MacroStubs' do
       @task.should_not be_nil
     end
 
-    it 'should create procs which evals to an array of mocks dynamically' do
-      proc = self.class.mock_tasks
+    it 'should create procs which evals to an array of mocks' do
+      proc = self.class.tasks_proc
       proc.should be_kind_of(Proc)
 
       @task.should be_nil
@@ -62,7 +77,7 @@ describe 'MacroStubs' do
   end
 
   describe 'failures' do
-    expects :find, :on =&gt; Task, :with =&gt; proc{ current_id }, :returns =&gt; mock_task
+    expects :find, :on =&gt; Task, :with =&gt; proc{ current_id }, :returns =&gt; task_proc
     expects :max, :min, :count, :on =&gt; Task, :ordered =&gt; true
 
     get :show, :id =&gt; 37
@@ -109,7 +124,7 @@ describe 'MacroStubs' do
   end
 
   describe 'when extending describe group behavior' do
-    expects :find, :on =&gt; Task, :with =&gt; proc{ current_id }, :returns =&gt; mock_task
+    expects :find, :on =&gt; Task, :with =&gt; proc{ current_id }, :returns =&gt; task_proc
     expects :count, :max, :min, :on =&gt; Task
 
     get :show, :id =&gt; 37
@@ -176,7 +191,7 @@ describe 'MacroStubs' do
     end
 
     describe Mime::XML do
-      expects :to_xml, :on =&gt; mock_task, :returns =&gt; 'XML'
+      expects :to_xml, :on =&gt; task_proc, :returns =&gt; 'XML'
 
       it 'should provide a description based on the mime given in describe' do
         self.class.description.should =~ /with xml$/
@@ -225,9 +240,9 @@ describe 'MacroStubs' do
     [:delete, :delete!].each do |method|
 
       describe method =&gt; :destroy, :id =&gt; '37' do
-        expects :find,    :on =&gt; Task, :with =&gt; '37', :returns =&gt; mock_task
-        expects :destroy, :on =&gt; mock_task
-        expects :title,   :on =&gt; mock_task, :with =&gt; false do |boolean|
+        expects :find,    :on =&gt; Task, :with =&gt; '37', :returns =&gt; task_proc
+        expects :destroy, :on =&gt; task_proc
+        expects :title,   :on =&gt; task_proc, :with =&gt; false do |boolean|
           if boolean
             'This should not appear'
           else
@@ -239,7 +254,7 @@ describe 'MacroStubs' do
         subject { controller }
 
         should_assign_to :task
-        should_assign_to :task, :with =&gt; mock_task
+        should_assign_to :task, :with =&gt; task_proc
         should_assign_to :task, :with_kind_of =&gt; Task
 
         should_set_the_flash</diff>
      <filename>remarkable_rails/spec/action_controller/macro_stubs_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,10 +55,9 @@ module FunctionalBuilder
 
   module ClassMethods
     def generate_macro_stubs_specs_for(matcher, *args)
-      stubs_args = args.dup
-
-      options = args.extract_options!
-      expectations_args = (args &lt;&lt; options.merge(:with_expectations =&gt; true))
+      expectation_args = args.dup
+      options          = args.extract_options!
+      stub_args        = (args &lt;&lt; options.merge(:with_stubs =&gt; true))
 
       describe 'macro stubs' do
         before(:each) do
@@ -70,21 +69,21 @@ module FunctionalBuilder
         expects :new, :on =&gt; String, :with =&gt; 'ola', :returns =&gt; 'ola'
         get :new
 
-        it 'should run stubs by default' do
-          String.should_receive(:stub!).with(:new).and_return(@mock=mock('chain'))
-          @mock.should_receive(:and_return).with('ola').and_return('ola')
-
-          send(matcher, *stubs_args).matches?(@controller)
-        end
-
-        it 'should run expectations' do
+        it 'should run expectations by default' do
           String.should_receive(:should_receive).with(:new).and_return(@mock=mock('chain'))
           @mock.should_receive(:with).with('ola').and_return(@mock)
           @mock.should_receive(:exactly).with(1).and_return(@mock)
           @mock.should_receive(:times).and_return(@mock)
           @mock.should_receive(:and_return).with('ola').and_return('ola')
 
-          send(matcher, *expectations_args).matches?(@controller)
+          send(matcher, *expectation_args).matches?(@controller)
+        end
+
+        it 'should run stubs' do
+          String.should_receive(:stub!).with(:new).and_return(@mock=mock('chain'))
+          @mock.should_receive(:and_return).with('ola').and_return('ola')
+
+          send(matcher, *stub_args).matches?(@controller)
         end
       end
 </diff>
      <filename>remarkable_rails/spec/functional_builder.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fe64b4437dd59813d58da62bc08a8419d7f932a2</id>
    </parent>
    <parent>
      <id>29595df68e793dd48819d74ebbf432c97f43a886</id>
    </parent>
  </parents>
  <author>
    <name>Lawrence Pit</name>
    <email>lawrence.pit@gmail.com</email>
  </author>
  <url>http://github.com/lawrencepit/remarkable/commit/caaf671a1005c7d73ee922939a364c5ba210535f</url>
  <id>caaf671a1005c7d73ee922939a364c5ba210535f</id>
  <committed-date>2009-06-30T01:13:34-07:00</committed-date>
  <authored-date>2009-06-30T01:13:34-07:00</authored-date>
  <message>Merge branch 'master' of git://github.com/carlosbrando/remarkable into banana</message>
  <tree>459b66089621d40ee858ce229c00c22966a2a688</tree>
  <committer>
    <name>Lawrence Pit</name>
    <email>lawrence.pit@gmail.com</email>
  </committer>
</commit>
