Last active
December 10, 2015 00:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: html-erb-mode not working | |
Given I have master of mmm-mode in "~/mmm-mode" directory | |
And I have file "test.el" with content: | |
''' | |
(add-to-list 'load-path "~/mmm-mode/") | |
(require 'mmm-auto) | |
(require 'mmm-erb) | |
(setq mmm-global-mode 'auto) | |
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-js) | |
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-css) | |
(mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb) | |
(mmm-add-mode-ext-class 'html-erb-mode "\\.jst\\.ejs\\'" 'ejs) | |
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode)) | |
''' | |
When I run "emacs -q -l test.el" | |
And I open html.erb file | |
Then mmm-mode picks up ruby part of the buffer | |
But not js part of the buffer | |
Scenario: html-erb-mode working | |
Given I have master of mmm-mode in "~/mmm-mode" directory | |
And I have file "test.el" with content: | |
''' | |
(add-to-list 'load-path "~/mmm-mode/") | |
(require 'mmm-auto) | |
(require 'mmm-erb) | |
(setq mmm-global-mode 'auto) | |
(mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb) | |
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-js) | |
(mmm-add-mode-ext-class 'html-erb-mode nil 'html-css) | |
(mmm-add-mode-ext-class 'html-erb-mode "\\.jst\\.ejs\\'" 'ejs) | |
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode)) | |
''' | |
When I run "emacs -q -l test.el" | |
And I open html.erb file | |
Then mmm-mode picks up ruby part of the buffer | |
And js part of the buffer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment