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
(defun rspec-to-shoulda () | |
"Translates RSpec code to Shoulda | |
NOTE: You still have to wrap the results in a Test::Unit class" | |
(interactive) | |
(dolist (pair '(("\\(require\s.*/\\)\\([a-z_]+\\)'$" "\\1test_helper'") ;; require | |
("describe\s" "context ") ;; RSpec -> Shoulda syntax | |
("it\s" "should ") | |
("\s\"should\s" " \"") | |
("before\s" "setup ") | |
("before(:each)\s" "setup ") |
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
Eli sucks... srsly. |