<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>rails-lib-layout.el</filename>
    </added>
    <added>
      <filename>rails-lib-minor-mode.el</filename>
    </added>
    <added>
      <filename>rails-rspec-controller-minor-mode.el</filename>
    </added>
    <added>
      <filename>rails-rspec-fixture-minor-mode.el</filename>
    </added>
    <added>
      <filename>rails-rspec-lib-minor-mode.el</filename>
    </added>
    <added>
      <filename>rails-rspec-minor-mode.el</filename>
    </added>
    <added>
      <filename>rails-rspec-model-minor-mode.el</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -63,7 +63,8 @@
       (:controller
        (if action-name
            (rails-controller-layout:switch-to-view controller-name action-name)
-         (rails-controller-layout:switch-to :functional-test))))))
+        (if (rails-core:spec-exist-p) (rails-controller-layout:switch-to :rspec-controller)
+           (rails-controller-layout:switch-to :functional-test)))))))
 
 (defun rails-controller-layout:create-view-for-action (controller-name action-name)
   (let ((type
@@ -133,6 +134,9 @@ If the action is nil, return all views for the controller.&quot;
                                        rails-controller-layout:switch-to-functional-test
                                        :enable (and (not (rails-core:current-mailer))
                                                     (not (eq (rails-core:buffer-type) :functional-test)))))
+        ([goto-rspec-controller] '(menu-item &quot;Go to RSpec&quot;
+                                       rails-controller-layout:switch-to-rspec-controller
+                                       :enable (not (eq (rails-core:buffer-type) :rspec-controller))))
         ([goto-controller] '(menu-item &quot;Go to Controller&quot;
                                        rails-controller-layout:switch-to-controller
                                        :enable (and (not (rails-core:current-mailer))
@@ -147,6 +151,7 @@ If the action is nil, return all views for the controller.&quot;
         ((rails-key &quot;f&quot;) 'rails-controller-layout:switch-to-functional-test)
         ((rails-key &quot;c&quot;) 'rails-controller-layout:switch-to-controller)
         ((rails-key &quot;u&quot;) 'rails-controller-layout:switch-to-unit-test)
+        ((rails-key &quot;r&quot;) 'rails-controller-layout:switch-to-rspec-controller)
         ([menu-bar rails-controller-layout] (cons name menu))))
     map))
 
@@ -158,6 +163,7 @@ If the action is nil, return all views for the controller.&quot;
          (item (case type
                  (:helper (rails-core:helper-file controller))
                  (:functional-test (rails-core:functional-test-file controller))
+                 (:rspec-controller (rails-core:rspec-controller-file controller))
                  (:controller (rails-core:controller-file controller))
                  (:model (rails-core:model-file model))
                  (:unit-test (rails-core:unit-test-file mailer))
@@ -173,6 +179,7 @@ If the action is nil, return all views for the controller.&quot;
 
 (defun rails-controller-layout:switch-to-helper () (interactive) (rails-controller-layout:switch-to :helper))
 (defun rails-controller-layout:switch-to-functional-test () (interactive) (rails-controller-layout:switch-to :functional-test))
+(defun rails-controller-layout:switch-to-rspec-controller () (interactive) (rails-controller-layout:switch-to :rspec-controller))
 (defun rails-controller-layout:switch-to-controller () (interactive) (rails-controller-layout:switch-to :controller))
 (defun rails-controller-layout:switch-to-model () (interactive) (rails-controller-layout:switch-to :model))
 (defun rails-controller-layout:switch-to-migration () (interactive) (rails-controller-layout:switch-to :migration))
@@ -197,6 +204,8 @@ If the action is nil, return all views for the controller.&quot;
         (add-to-list 'item (cons &quot;Helper&quot; :helper)))
       (unless (eq type :functional-test)
         (add-to-list 'item (cons &quot;Functional Test&quot; :functional-test)))
+      (unless (eq type :rspec-controller)
+        (add-to-list 'item (cons &quot;RSpec&quot; :rspec-controller)))
       (unless (eq type :controller)
         (add-to-list 'item (cons &quot;Controller&quot; :controller))))
     (when mailer</diff>
      <filename>rails-controller-layout.el</filename>
    </modified>
    <modified>
      <diff>@@ -35,12 +35,17 @@
     &quot;app/helpers&quot;
     &quot;test/unit&quot;
     &quot;test/functional&quot;
-    &quot;test/fixtures&quot;)
+    &quot;test/fixtures&quot;
+    &quot;spec/controllers&quot;
+    &quot;spec/fixtures&quot;
+    &quot;spec/lib&quot;
+    &quot;spec/models&quot;
+    &quot;lib&quot;)
   &quot;Directories with Rails classes&quot;)
 
 (defun rails-core:class-by-file (filename)
   &quot;Return the class associated with FILENAME.
-   &lt;rails-root&gt;/(app/models|app/controllers|app/helpers|test/unit|test/functional)/foo/bar_baz
+   &lt;rails-root&gt;/(app/models|app/controllers|app/helpers|test/unit|test/functional|lib|spec/controllers|spec/lib|spec/models)/foo/bar_baz
                 --&gt; Foo::BarBaz&quot;
   (let* ((case-fold-search nil)
          (path (replace-regexp-in-string
@@ -236,14 +241,14 @@ it does not exist, ask to create it using QUESTION as a prompt.&quot;
   &quot;Return the file name of partial NAME.&quot;
   (if (string-match &quot;/&quot; name)
       (concat &quot;app/views/&quot;
-        (replace-regexp-in-string &quot;\\([^/]*\\)$&quot; &quot;_\\1.rhtml&quot; name))
+        (replace-regexp-in-string &quot;\\([^/]*\\)$&quot; &quot;_\\1.html.erb&quot; name))
     (concat (rails-core:views-dir (rails-core:current-controller))
-      &quot;_&quot; name &quot;.rhtml&quot;)))
+      &quot;_&quot; name &quot;.html.erb&quot;)))
 
 (defun rails-core:view-name (name)
   &quot;Return the file name of view NAME.&quot;
   (concat (rails-core:views-dir (rails-core:current-controller))
-          name &quot;.rhtml&quot;)) ;; BUG: will fix it
+          name &quot;.html.erb&quot;)) ;; BUG: will fix it
 
 (defun rails-core:helper-file (controller)
   &quot;Return the helper file name for the controller named
@@ -313,6 +318,50 @@ CONTROLLER.&quot;
       controller
     (concat controller &quot;Controller&quot;)))
 
+(defun rails-core:rspec-controller-file (controller)
+  &quot;Return the controller spec file name for the controller named
+CONTROLLER.&quot;
+  (when controller
+    (format &quot;spec/controllers/%s_spec.rb&quot;
+            (rails-core:file-by-class (rails-core:long-controller-name controller) t))))
+
+(defun rails-core:lib-file (lib-name)
+  &quot;Return the model file from the lib name.&quot;
+  (when lib-name
+    (concat &quot;lib/&quot; (rails-core:file-by-class lib-name))))
+
+(defun rails-core:rspec-lib-file (lib)
+  &quot;Return the lib spec file name for the lib named LIB.&quot;
+  (when lib
+    (format &quot;spec/lib/%s_spec.rb&quot; (rails-core:file-by-class lib t))))
+
+(defun rails-core:rspec-model-file (model)
+  &quot;Return the model spec file name for the model named MODEL.&quot;
+  (when model
+    (format &quot;spec/models/%s_spec.rb&quot; (rails-core:file-by-class model t))))
+
+(defun rails-core:rspec-fixture-file (model)
+  &quot;Return the rspec fixtures file name for the model named MODEL.&quot;
+  (when model
+    (format &quot;spec/fixtures/%s.yml&quot; (pluralize-string (rails-core:file-by-class model t)))))
+
+(defun rails-core:rspec-lib-exist-p (lib)
+  &quot;Return the lib spec file name for the model named MODEL.&quot;
+  (let ((spec (rails-core:rspec-lib-file lib)))
+    (when spec
+      (file-exists-p (rails-core:file spec)))))
+
+(defun rails-core:rspec-model-exist-p (model)
+  &quot;Return the model spec file name for the model named MODEL.&quot;
+  (let ((spec (rails-core:rspec-model-file model)))
+    (when spec
+      (file-exists-p (rails-core:file spec)))))
+
+(defun rails-core:rspec-fixture-exist-p (model)
+  (when model
+    (file-exists-p
+     (rails-core:file (rails-core:rspec-fixture-file model)))))
+
 ;;;;;;;;;; Functions that return collection of Rails objects  ;;;;;;;;;;
 (defun rails-core:observer-p (name)
   (when name
@@ -483,6 +532,29 @@ If the action is nil, return all views for the controller.&quot;
   &quot;Return the parent classes of controllers.&quot;
   (rails-core:extract-ancestors (rails-core:controllers)))
 
+(defun rails-core:rspec-controllers ()
+  &quot;Return a list of Rails controller specs.&quot;
+  (mapcar
+   #'(lambda(it)
+       (remove-postfix (rails-core:class-by-file it)
+                       &quot;Spec&quot;))
+   (find-recursive-files &quot;\\.rb$&quot; (rails-core:file &quot;spec/controllers/&quot;))))
+
+(defun rails-core:rspec-models ()
+  &quot;Return a list of Rails model specs.&quot;
+  (mapcar
+   #'(lambda(it)
+       (remove-postfix (rails-core:class-by-file it)
+                       &quot;Spec&quot;))
+   (find-recursive-files &quot;\\.rb$&quot; (rails-core:file &quot;spec/models/&quot;))))
+
+(defun rails-core:rspec-fixtures ()
+  &quot;Return a list of Rails RSpec fixtures.&quot;
+  (mapcar
+   #'(lambda (l)
+       (replace-regexp-in-string &quot;\\.[^.]+$&quot; &quot;&quot; l))
+   (find-recursive-files &quot;\\.yml$&quot; (rails-core:file &quot;spec/fixtures/&quot;))))
+
 ;;;;;;;;;; Getting Controllers/Model/Action from current buffer ;;;;;;;;;;
 
 (defun rails-core:current-controller ()
@@ -494,7 +566,8 @@ If the action is nil, return all views for the controller.&quot;
         (:view (rails-core:class-by-file
                 (directory-file-name (directory-of-file (buffer-file-name)))))
         (:helper (remove-postfix file-class &quot;Helper&quot;))
-        (:functional-test (remove-postfix file-class &quot;ControllerTest&quot;))))))
+        (:functional-test (remove-postfix file-class &quot;ControllerTest&quot;))
+        (:rspec-controller (remove-postfix file-class &quot;Spec&quot;))))))
 
 (defun rails-core:current-model ()
   &quot;Return the current Rails model.&quot;
@@ -504,7 +577,17 @@ If the action is nil, return all views for the controller.&quot;
         (:migration (rails-core:model-by-migration-filename (buffer-name)))
         (:model file-class)
         (:unit-test (remove-postfix file-class &quot;Test&quot;))
-        (:fixture (singularize-string file-class))))))
+        (:fixture (singularize-string file-class))
+        (:rspec-fixture (singularize-string file-class))
+        (:rspec-model (remove-postfix file-class &quot;Spec&quot;))))))
+
+(defun rails-core:current-lib ()
+  &quot;Return the current lib.&quot;
+  (let* ((file-class (rails-core:class-by-file (buffer-file-name))))
+    (unless (rails-core:mailer-p file-class)
+      (case (rails-core:buffer-type)
+        (:lib file-class)
+        (:rspec-lib (remove-postfix file-class &quot;Spec&quot;))))))
 
 (defun rails-core:current-mailer ()
   &quot;Return the current Rails Mailer, else return nil.&quot;
@@ -669,6 +752,10 @@ the Rails minor mode log.&quot;
 
 (defun rails-core:rhtml-buffer-p ()
   &quot;Return non nil if the current buffer is rhtml file.&quot;
-  (string-match &quot;\\.rhtml$&quot; (buffer-file-name)))
+  (string-match &quot;\\.html.erb$&quot; (buffer-file-name)))
+
+(defun rails-core:spec-exist-p ()
+  &quot;Return non nil if spec directory is exist.&quot;
+  (file-exists-p (rails-core:file &quot;spec&quot;)))
 
 (provide 'rails-core)</diff>
      <filename>rails-core.el</filename>
    </modified>
    <modified>
      <diff>@@ -55,6 +55,7 @@
 (rails-find:gen &quot;spec&quot; &quot;spec/&quot;)
 (rails-find:gen &quot;spec-controllers&quot; &quot;spec/controllers/&quot;)
 (rails-find:gen &quot;spec-models&quot; &quot;spec/models/&quot;)
+(rails-find:gen &quot;spec-helpers&quot; &quot;spec/views/&quot;)
 (rails-find:gen &quot;spec-helpers&quot; &quot;spec/helpers/&quot;)
 (rails-find:gen &quot;spec-fixtures&quot; &quot;spec/fixtures/&quot;)
 </diff>
      <filename>rails-find.el</filename>
    </modified>
    <modified>
      <diff>@@ -41,6 +41,11 @@
                                        :enable (and (not (eq (rails-core:buffer-type) :unit-test))
                                                     (rails-core:unit-test-exist-p (or (rails-core:current-model)
                                                                                       (rails-core:current-mailer))))))
+        ([goto-rspec]      '(menu-item &quot;Go to RSpec&quot;
+                                       rails-model-layout:switch-to-rspec-model
+                                       :enable (and (not (eq (rails-core:buffer-type) :rspec-model))
+                                                    (rails-core:rspec-model-exist-p (or (rails-core:current-model)
+                                                                                      (rails-core:current-mailer))))))
         ([goto-migration]  '(menu-item &quot;Go to Migration&quot;
                                        rails-model-layout:switch-to-migration
                                        :enable (and (not (eq (rails-core:buffer-type) :migration))
@@ -52,15 +57,21 @@
                                        rails-model-layout:switch-to-fixture
                                        :enable (and (not (eq (rails-core:buffer-type) :fixture))
                                                     (rails-core:fixture-exist-p (rails-core:current-model)))))
+        ([goto-rspec-fixture]    '(menu-item &quot;Go to RSpec Fixture&quot;
+                                       rails-model-layout:switch-to-rspec-fixture
+                                       :enable (and (not (eq (rails-core:buffer-type) :rspec-fixture))
+                                                    (rails-core:rspec-fixture-exist-p (rails-core:current-model)))))
         ([goto-mailer]     '(menu-item &quot;Go to Mailer&quot;
                                        rails-model-layout:switch-to-mailer
                                        :enable (rails-core:mailer-exist-p (rails-core:current-mailer)))))
       (define-keys map
         ((rails-key &quot;m&quot;)         'rails-model-layout:switch-to-model)
         ((rails-key &quot;u&quot;)         'rails-model-layout:switch-to-unit-test)
+        ((rails-key &quot;r&quot;)         'rails-model-layout:switch-to-rspec-model)
         ((rails-key &quot;g&quot;)         'rails-model-layout:switch-to-migration)
         ((rails-key &quot;c&quot;)         'rails-model-layout:switch-to-controller)
         ((rails-key &quot;x&quot;)         'rails-model-layout:switch-to-fixture)
+        ((rails-key &quot;z&quot;)         'rails-model-layout:switch-to-rspec-fixture)
         ((rails-key &quot;n&quot;)         'rails-model-layout:switch-to-mailer)
         ([menu-bar rails-model-layout] (cons name menu))))
     map))
@@ -75,7 +86,9 @@
                  (:mailer (rails-core:mailer-file mailer))
                  (:controller (rails-core:controller-file-by-model model))
                  (:fixture (rails-core:fixture-file model))
+                 (:rspec-fixture (rails-core:rspec-fixture-file model))
                  (:unit-test (rails-core:unit-test-file item))
+                 (:rspec-model (rails-core:rspec-model-file item))
                  (:model (rails-core:model-file model))
                  (:migration (rails-core:migration-file-by-model model)))))
     (if item
@@ -90,7 +103,9 @@
 (defun rails-model-layout:switch-to-mailer () (interactive) (rails-model-layout:switch-to :mailer))
 (defun rails-model-layout:switch-to-controller () (interactive) (rails-model-layout:switch-to :controller))
 (defun rails-model-layout:switch-to-fixture () (interactive) (rails-model-layout:switch-to :fixture))
+(defun rails-model-layout:switch-to-rspec-fixture () (interactive) (rails-model-layout:switch-to :rspec-fixture))
 (defun rails-model-layout:switch-to-unit-test () (interactive) (rails-model-layout:switch-to :unit-test))
+(defun rails-model-layout:switch-to-rspec-model () (interactive) (rails-model-layout:switch-to :rspec-model))
 (defun rails-model-layout:switch-to-model () (interactive) (rails-model-layout:switch-to :model))
 (defun rails-model-layout:switch-to-migration () (interactive) (rails-model-layout:switch-to :migration))
 
@@ -108,10 +123,14 @@
         (add-to-list 'item (cons &quot;Migration&quot; :migration)))
       (unless (eq type :fixture)
         (add-to-list 'item (cons &quot;Fixture&quot; :fixture)))
+      (unless (eq type :rspec-fixture)
+        (add-to-list 'item (cons &quot;RSpec Fixture&quot; :rspec-fixture)))
       (when (rails-core:controller-exist-p controller)
         (add-to-list 'item (cons &quot;Controller&quot; :controller)))
       (unless (eq type :unit-test)
         (add-to-list 'item (cons &quot;Unit Test&quot; :unit-test)))
+      (unless (eq type :rspec-model)
+        (add-to-list 'item (cons &quot;RSpec&quot; :rspec-model)))
       (unless (eq type :model)
         (add-to-list 'item (cons &quot;Model&quot; :model))))
     (when mailer</diff>
      <filename>rails-model-layout.el</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,8 @@
   &quot;Minor mode for RubyOnRails models.&quot;
   :lighter &quot; Model&quot;
   :keymap (rails-model-layout:keymap :model)
-  (setq rails-primary-switch-func 'rails-model-layout:switch-to-unit-test)
+  (if (rails-core:spec-exist-p) (setq rails-primary-switch-func 'rails-model-layout:switch-to-rspec-model)
+      (setq rails-primary-switch-func 'rails-model-layout:switch-to-unit-test))
   (setq rails-secondary-switch-func 'rails-model-layout:menu))
 
 (provide 'rails-model-minor-mode)
\ No newline at end of file</diff>
      <filename>rails-model-minor-mode.el</filename>
    </modified>
    <modified>
      <diff>@@ -136,6 +136,46 @@
    (lambda (plugin)
      (concat &quot;vendor/plugins/&quot; plugin &quot;/init.rb&quot;))))
 
+(defun rails-nav:goto-rspec-controllers ()
+  &quot;Go to controller specs.&quot;
+  (interactive)
+  (rails-nav:goto-file-with-menu-from-list
+   (rails-core:rspec-controllers)
+   &quot;Go to controller spec.&quot;
+   'rails-core:rspec-controller-file))
+
+(defun rails-nav:goto-rspec-lib ()
+  &quot;Go to lib specs.&quot;
+  (interactive)
+  (rails-nav:goto-file-with-menu-from-list
+   (rails-core:rspec-lib)
+   &quot;Go to lib spec.&quot;
+   'rails-core:rspec-lib-file))
+
+(defun rails-nav:goto-rspec-models ()
+  &quot;Go to model specs.&quot;
+  (interactive)
+  (rails-nav:goto-file-with-menu-from-list
+   (rails-core:rspec-models)
+   &quot;Go to model spec.&quot;
+   'rails-core:rspec-model-file))
+
+(defun rails-nav:goto-rspec-views ()
+  &quot;Go to view specs.&quot;
+  (interactive)
+  (rails-nav:goto-file-with-menu-from-list
+   (rails-core:rspec-views)
+   &quot;Go to view spec.&quot;
+   'rails-core:rspec-view-file))
+
+(defun rails-nav:goto-rspec-fixtures ()
+  &quot;Go to rspec fuxtures.&quot;
+  (interactive)
+  (rails-nav:goto-file-with-menu-from-list
+   (rails-core:rspec-fixtures)
+   &quot;Go to rspec fixtures.&quot;
+   'rails-core:rspec-fixture-file))
+
 (defun rails-nav:create-new-layout (&amp;optional name)
   &quot;Create a new layout.&quot;
   (let ((name (or name (read-string &quot;Layout name? &quot;))))</diff>
      <filename>rails-navigation.el</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,7 @@
 (defconst rails-snippets-feature:list
   '((0 &quot;ruby&quot;)
     (1 &quot;loops&quot; ruby-mode-abbrev-table
+       (&quot;end&quot; &quot;$&gt;$.\nend$&gt;&quot; &quot;end&quot;) ;; to avoid expanding when i want to indent
        (&quot;while&quot; &quot;while $${condition}\n$&gt;$.\nend$&gt;&quot; &quot;while ... end&quot;)
        (&quot;when&quot; &quot;when $${condition}\n$&gt;$.&quot; &quot;when ...&quot;)
        (&quot;w&quot; &quot;attr_writer :$${attr_names}&quot; &quot;attr_writer ...&quot;)
@@ -172,6 +173,8 @@
        (&quot;%ifel&quot; &quot;&lt;% if $${cond} -%&gt;\n$.\n&lt;% else -%&gt;\n&lt;% end -%&gt;&quot; &quot;&lt;% if/else/end %&gt;&quot;)
        (&quot;%unless&quot; &quot;&lt;% unless $${cond} -%&gt;\n$.\n&lt;% end -%&gt;&quot; &quot;&lt;% unless/end %&gt;&quot;)
        (&quot;%for&quot; &quot;&lt;% for $${elem} in @$${list} %&gt;\n$&gt;$.\n&lt;% end %&gt;$&gt;&quot; &quot;&lt;% for/end %&gt;&quot;)
+       (&quot;han&quot; &quot;$${Model}.human_attribute_name('$${title}')&quot; &quot;human_attribute_name&quot;)
+       (&quot;hn&quot; &quot;$${Model}.human_name&quot; &quot;human_name&quot;)
        (&quot;%&quot; &quot;&lt;% $. -%&gt;&quot; &quot;&lt;% ... %&gt;&quot;)
        (&quot;%%&quot; &quot;&lt;%= $. %&gt;&quot; &quot;&lt;%= ... %&gt;&quot;)) ; erb
     (0 &quot;controller&quot; rails-controller-minor-mode-abbrev-table
@@ -209,7 +212,7 @@
        (&quot;rns&quot; &quot;render :nothing =&gt; $${true}, :status =&gt; $${401}&quot; &quot;render (nothing, status)&quot;)
        (&quot;rp&quot; &quot;render :partial =&gt; '$${item}'&quot; &quot;render (partial)&quot;)
        (&quot;rpc&quot; &quot;render :partial =&gt; '$${item}', :collection =&gt; $${items}&quot; &quot;render (partial, collection)&quot;)
-       (&quot;rpl&quot; &quot;render :partial =&gt; '$${item}', :locals =&gt; { :$${name} =&gt; '$${value}'$${4} }&quot; &quot;render (partial, locals)&quot;)
+       (&quot;rpl&quot; &quot;render :partial =&gt; '$${item}', :locals =&gt; { :$${name} =&gt; $${value} }&quot; &quot;render (partial, locals)&quot;)
        (&quot;rpo&quot; &quot;render :partial =&gt; '$${item}', :object =&gt; $${object}&quot; &quot;render (partial, object)&quot;)
        (&quot;rcea&quot; &quot;render_component :action =&gt; '$${index}'&quot; &quot;render_component (action)&quot;)
        (&quot;rcec&quot; &quot;render_component :controller =&gt; '$${items}'&quot; &quot;render_component (controller)&quot;)
@@ -228,6 +231,8 @@
        (&quot;rdl&quot; &quot;RAILS_DEFAULT_LOGGER.debug '$${message}'$.&quot; &quot;RAILS_DEFAULT_LOGGER.debug&quot;)
        (&quot;nr&quot; &quot;@$${item}.new_record?&quot; &quot;item.new_record?&quot;)) ; rails
     (0 &quot;model&quot; rails-model-minor-mode-abbrev-table
+       (&quot;ns&quot; &quot;named_scope :$${name}, :conditions =&gt; {:$${attribute} =&gt; $${value}}&quot; &quot;named_scope&quot;)
+       (&quot;nsl&quot; &quot;named_scope :$${name},  lambda {|$${param}| { :conditions =&gt; ['$${attribute} &gt; ?', $${param}]} }&quot; &quot;named_scope_lamba&quot;)
        (&quot;va&quot; &quot;validates_associated :$${attribute}&quot; &quot;validates_associated&quot;)
        (&quot;vc&quot; &quot;validates_confirmation_of :$${attribute}&quot; &quot;validates_confirmation_of&quot;)
        (&quot;ve&quot; &quot;validates_exclusion_of :$${attribute}&quot; &quot;validates_exclusion_of&quot;)
@@ -239,7 +244,7 @@
        (&quot;hm&quot; &quot;has_many :$${objects}&quot; &quot;has_many&quot;)
        (&quot;hmt&quot; &quot;has_many :$${objects}, :through =&gt; :$${,rails-snippets-feature:prev-has-many-table-name}&quot; &quot;has_many :through&quot;)
        (&quot;ho&quot; &quot;has_one :$${object}&quot; &quot;has_one&quot;)
-       (&quot;habtm&quot; &quot;has_and_belongs_to_many :$${object}&quot; &quot;has_and_belongs_to_many&quot;)) ; model
+       (&quot;habtm&quot; &quot;has_and_belongs_to_many :$${object}, :join_table =&gt; '$${table_name}', :foreign_key =&gt; '$${foreign_key}'&quot; &quot;has_and_belongs_to_many&quot;)) ; model
     (0 &quot;migrations&quot; rails-migration-minor-mode-abbrev-table
        (&quot;tcls&quot; &quot;t.column :$${title}, :$${string}\n$&gt;tcls$.&quot; &quot;create several columns&quot;)
        (&quot;tcl&quot; &quot;t.column :$${title}, :$${string}$.&quot; &quot;create column&quot;)
@@ -269,7 +274,7 @@
        (&quot;shoulds&quot; &quot;should \&quot;$${description}\&quot; do\n$&gt;flunk\nend$&gt;\n\n$&gt;shoulds$.&quot; &quot;several should blocks&quot;)
        (&quot;shoulde&quot; &quot;should_eventually \&quot;$${description}\&quot; do\n $&gt;$.\nend$&gt;&quot; &quot;should_eventually block&quot;)
        (&quot;shouldes&quot; &quot;should_eventually \&quot;$${description}\&quot;\n$&gt;shouldes$.&quot; &quot;several should_eventually statements&quot;)
-       (&quot;laf&quot; &quot;load_all_fixtures&quot; &quot;load_all_fixtures&quot;)
+       (&quot;laf&quot; &quot;fixtures :all&quot; &quot;fixtures :all&quot;)
        (&quot;sat&quot; &quot;should_assign_to :$${variable}&quot; &quot;should_assign_to&quot;)
        (&quot;savf&quot; &quot;should_allow_values_for :$${attribute}&quot; &quot;should_allow_values_for&quot;)
        (&quot;sbt&quot; &quot;should_belong_to :$${object}&quot; &quot;should_belong_to&quot;)
@@ -312,6 +317,8 @@
        (&quot;asrt&quot; &quot;assert_respond_to $${object}, :$${method}&quot; &quot;assert_respond_to(...)&quot;)
        (&quot;ass&quot; &quot;assert_same $${expected}, $${actual}&quot; &quot;assert_same(...)&quot;)
        (&quot;assd&quot; &quot;assert_send [$${object}, :$${message}, $${args}]&quot; &quot;assert_send(...)&quot;)
+       (&quot;asd&quot; &quot;assert_difference \&quot;$${count}\&quot;, $${1} do\n$&gt;$.\nend$&gt;&quot; &quot;assert_difference .. do .. end&quot;)
+       (&quot;asnd&quot; &quot;assert_no_difference \&quot;$${count}\&quot; do\n$&gt;$.\nend$&gt;&quot; &quot;assert_no_difference .. do .. end&quot;)
        (&quot;ast&quot; &quot;assert_throws :$${expected} { $. }&quot; &quot;assert_throws(...) { ... }&quot;)
        (&quot;astm&quot; &quot;assert_template '$${index}'&quot; &quot;assert_template&quot;))))
 </diff>
      <filename>rails-snippets-feature.el</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,12 @@
     (&quot;Functional Tests&quot; rails-core:functional-tests  rails-core:functional-test-file)
     (&quot;Unit Tests&quot;       rails-core:unit-tests        rails-core:unit-test-file)
     (&quot;Fixtures&quot;         rails-core:fixtures          rails-core:fixture-file)
+    (&quot;RSpec Controllers&quot; rails-core:rspec-controllers  rails-core:rspec-controller-file)
+    (&quot;RSpec Fixtures&quot;    rails-core:rspec-fixtures     rails-core:rspec-fixture-file)
+    (&quot;RSpec Lib&quot;         rails-core:rspec-lib          rails-core:rspec-lib-file)
+    (&quot;RSpec Models&quot;      rails-core:rspec-models       rails-core:rspec-model-file)
+    (&quot;RSpec Views&quot;       rails-core:rspec-views        rails-core:rspec-view-file)
+    (&quot;Fixtures&quot;          rails-core:fixtures           rails-core:fixture-file)
     (&quot;Configuration&quot;    rails-core:configuration-files rails-core:configuration-file)))
 
 (defvar rails-speedbar:menu-items nil)</diff>
      <filename>rails-speedbar-feature.el</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,11 @@
       ([goto-unit-tests]  '(&quot;Go to Unit Tests&quot;       . rails-nav:goto-unit-tests))
       ([goto-func-tests]  '(&quot;Go to Functional Tests&quot; . rails-nav:goto-functional-tests))
       ([goto-models]      '(&quot;Go to Models&quot;           . rails-nav:goto-models))
-      ([goto-controllers] '(&quot;Go to Controllers&quot;      . rails-nav:goto-controllers)))
+      ([goto-controllers] '(&quot;Go to Controllers&quot;      . rails-nav:goto-controllers))
+      ([goto-rspec-controllers] '(&quot;Go to RSpec Controllers&quot; . rails-nav:goto-rspec-controllers))
+      ([goto-rspec-lib]         '(&quot;Go to RSpec Lib&quot;         . rails-nav:goto-rspec-lib))
+      ([goto-rspec-models]      '(&quot;Go to RSpec Models&quot;      . rails-nav:goto-rspec-models))
+      ([goto-rspec-fixtures]    '(&quot;Go to RSpec Fixtures&quot;    . rails-nav:goto-rspec-fixtures)))
     map))
 
 (defconst rails-minor-mode-tests-menu-bar-map
@@ -229,6 +233,10 @@
   ((rails-key &quot;\C-c g x&quot;) 'rails-nav:goto-fixtures)
   ((rails-key &quot;\C-c g f&quot;) 'rails-nav:goto-functional-tests)
   ((rails-key &quot;\C-c g u&quot;) 'rails-nav:goto-unit-tests)
+  ((rails-key &quot;\C-c g r c&quot;) 'rails-nav:goto-rspec-controllers)
+  ((rails-key &quot;\C-c g r f&quot;) 'rails-nav:goto-rspec-fixtures)
+  ((rails-key &quot;\C-c g r l&quot;) 'rails-nav:goto-rspec-lib)
+  ((rails-key &quot;\C-c g r m&quot;) 'rails-nav:goto-rspec-models)
 
   ;; Switch
   ((kbd &quot;&lt;M-S-up&gt;&quot;)      'rails-lib:run-primary-switch)
@@ -278,17 +286,22 @@
   ((rails-key &quot;\C-c d p&quot;) 'rails-rake:migrate-to-prev-version)
   ((rails-key &quot;\C-c d t&quot;) 'rails-rake:clone-development-db-to-test-db)
 
-
-
   ;; Tests
   ((rails-key &quot;\C-c r&quot;)   'rails-rake:task)
   ((rails-key &quot;\C-c t&quot;)   'rails-test:run)
   ((rails-key &quot;\C-c .&quot;)   'rails-test:run-current)
-  ((rails-key &quot;\C-c y i&quot;)   'rails-test:run-integration)
-  ((rails-key &quot;\C-c y u&quot;)   'rails-test:run-units)
-  ((rails-key &quot;\C-c y f&quot;)   'rails-test:run-functionals)
+  ((rails-key &quot;\C-c y i&quot;) 'rails-test:run-integration)
+  ((rails-key &quot;\C-c y u&quot;) 'rails-test:run-units)
+  ((rails-key &quot;\C-c y f&quot;) 'rails-test:run-functionals)
   ((rails-key &quot;\C-c #&quot;)   'rails-test:run-recent)
-  ((rails-key &quot;\C-c y a&quot;)   'rails-test:run-all)
+  ((rails-key &quot;\C-c y a&quot;) 'rails-test:run-all)
+
+  ;; RSpec
+  ((rails-key &quot;\C-c z f&quot;) 'rails-spec:run-files)
+  ((rails-key &quot;\C-c z .&quot;) 'rails-spec:run-this-file)
+  ((rails-key &quot;\C-c z a&quot;) 'rails-spec:run-all)
+  ((rails-key &quot;\C-c z l&quot;) 'rails-spec:run-last)
+  ((rails-key &quot;\C-c z s&quot;) 'rails-spec:run-this-spec)
 
   ;; Log files
   ((rails-key &quot;\C-c l&quot;)    'rails-log:open)</diff>
      <filename>rails-ui.el</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@
           (insert  &quot;\n&quot;)
           (split-window-vertically)
           (other-window 1)
-          (find-file (concat &quot;_&quot; name &quot;.rhtml&quot;))
+          (find-file (concat &quot;_&quot; name &quot;.html.erb&quot;))
           (goto-char (point-min))
           (erase-buffer)
           (insert content)
@@ -112,4 +112,4 @@
       (local-set-key (rails-key &quot;p&quot;) 'rails-view-minor-mode:create-partial-from-selection)
       (local-set-key (rails-key &quot;b&quot;) 'rails-view-minor-mode:create-helper-from-block))))
 
-(provide 'rails-view-minor-mode)
\ No newline at end of file
+(provide 'rails-view-minor-mode)</diff>
      <filename>rails-view-minor-mode.el</filename>
    </modified>
    <modified>
      <diff>@@ -90,7 +90,7 @@ using `rails-default-environment'.&quot;
               (env (if env env rails-default-environment))
               (command (rails-ws:compute-server-conmmand rails-ws:default-server-type rails-ws:port env))
               (proc
-               (rails-cmd-proxy:start-process rails-ruby-command
+               (rails-cmd-proxy:start-process-color rails-ruby-command
                                               rails-ws:buffer-name
                                               (car command)
                                               (cadr command))))
@@ -201,4 +201,4 @@ Prefix the command to ask parameters for action.&quot;
                      (read-from-minibuffer &quot;Parameters: &quot;))))
      (message &quot;You can auto-open browser only in view or controller&quot;))))
 
-(provide 'rails-ws)
\ No newline at end of file
+(provide 'rails-ws)</diff>
      <filename>rails-ws.el</filename>
    </modified>
    <modified>
      <diff>@@ -67,6 +67,7 @@
 (require 'rails-model-layout)
 (require 'rails-controller-layout)
 (require 'rails-features)
+(require 'rails-lib-layout)
 (require 'rails-spec)
 (require 'rails-shoulda)
 
@@ -172,10 +173,17 @@ Emacs w3m browser.&quot;
     (:model            &quot;app/models/&quot; (lambda (file) (and (not (rails-core:mailer-p file))
                                                          (not (rails-core:observer-p file)))))
     (:helper           &quot;app/helpers/&quot;)
+    (:unit-test        &quot;vendor/plugins/.*/test/&quot;) ; needs to appear before more-general :plugin
+    (:model            &quot;vendor/plugins/.*/lib/&quot;) ; needs to appear before more-general :plugin
     (:plugin           &quot;vendor/plugins/&quot;)
     (:unit-test        &quot;test/unit/&quot;)
     (:functional-test  &quot;test/functional/&quot;)
     (:fixture          &quot;test/fixtures/&quot;)
+    (:lib              &quot;lib&quot;)
+    (:rspec-controller &quot;spec/controllers&quot;)
+    (:rspec-fixture    &quot;spec/fixtures&quot;)
+    (:rspec-lib        &quot;spec/lib&quot;)
+    (:rspec-model      &quot;spec/models&quot;)
     (:migration        &quot;db/migrate&quot;))
   &quot;Rails file types -- rails directories map&quot;)
 
@@ -219,7 +227,7 @@ Emacs w3m browser.&quot;
           (kill-region (point-min) (point-max))
           (message (concat &quot;Please wait...&quot;))
           (call-process rails-ri-command nil &quot;*ri*&quot; t item)
-          (local-set-key [return] 'rails-search-doc)
+;          (local-set-key [return] 'rails-search-doc) ; because this kicks in in text files. why? -mike
           (ansi-color-apply-on-region (point-min) (point-max))
           (setq buffer-read-only t)
           (goto-char (point-min))))))
@@ -412,7 +420,7 @@ necessary.&quot;
             (modify-syntax-entry ?! &quot;w&quot; (syntax-table))
             (modify-syntax-entry ?: &quot;w&quot; (syntax-table))
             (modify-syntax-entry ?_ &quot;w&quot; (syntax-table))
-            (local-set-key (kbd &quot;C-.&quot;) 'complete-tag)
+            ;(local-set-key (kbd &quot;C-.&quot;) 'complete-tag)
             (local-set-key (if rails-use-another-define-key
                                (kbd &quot;TAB&quot;) (kbd &quot;&lt;tab&gt;&quot;))
                            'indent-and-complete)
@@ -458,8 +466,8 @@ necessary.&quot;
 (setq auto-mode-alist  (cons '(&quot;\\.rxml$&quot;    . ruby-mode) auto-mode-alist))
 (setq auto-mode-alist  (cons '(&quot;\\.builder$&quot; . ruby-mode) auto-mode-alist))
 (setq auto-mode-alist  (cons '(&quot;\\.rjs$&quot;     . ruby-mode) auto-mode-alist))
-(setq auto-mode-alist  (cons '(&quot;\\.rhtml$&quot;   . html-mode) auto-mode-alist))
-(setq auto-mode-alist  (cons '(&quot;\\.erb$&quot;     . html-mode) auto-mode-alist))
+(setq auto-mode-alist  (cons '(&quot;\\.rhtml$&quot;   . rhtml-mode) auto-mode-alist))
+(setq auto-mode-alist  (cons '(&quot;\\.erb$&quot;     . rhtml-mode) auto-mode-alist))
 
 (modify-coding-system-alist 'file &quot;\\.rb$&quot;     'utf-8)
 (modify-coding-system-alist 'file &quot;\\.rake$&quot;   'utf-8)</diff>
      <filename>rails.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c9f2755e54319aeb44ca46f86a3ceceec6d2606c</id>
    </parent>
    <parent>
      <id>ac1df061b6560fd04b9067b555c7f6f404c13bea</id>
    </parent>
  </parents>
  <author>
    <name>R&#233;mi Vanicat</name>
    <email>vanicat@debian.org</email>
  </author>
  <url>http://github.com/remvee/emacs-rails/commit/fe056555d543b4cf3753cf0de85fd94d2d7589b8</url>
  <id>fe056555d543b4cf3753cf0de85fd94d2d7589b8</id>
  <committed-date>2009-02-11T02:58:34-08:00</committed-date>
  <authored-date>2009-02-11T02:58:04-08:00</authored-date>
  <message>Merge commit 'crazycode/master'</message>
  <tree>7196742e1befddddaa310905cfb959ecb1c1ae8c</tree>
  <committer>
    <name>R&#233;mi Vanicat</name>
    <email>vanicat@debian.org</email>
  </committer>
</commit>
