Code Monkey home page Code Monkey logo

rspec-mode's Introduction

Emacs RSpec Mode

RSpec mode provides some convenience functions for dealing with RSpec.

Installation

You can install via ELPA, or manually by downloading rspec-mode and adding the following to your init file:

(add-to-list 'load-path "/path/to/rspec-mode")
(require 'rspec-mode)

Provided you have yasnippet installed, you can load the snippets:

(eval-after-load 'rspec-mode
  '(rspec-install-snippets))

(This isn't done automatically to avoid conflicts with snippets you may already have set up.)

Usage

If rspec-mode is installed properly, it will be started automatically when ruby-mode is started.

See rspec-mode.el for further usage.

Gotchas

ZSH and RVM

If you use ZSH and RVM, you may encounter problems running the specs. It may be so that an older version of Ruby, than the one you specified in .rvmrc, is used. This is because ZSH runs a small script each time a shell is created, which modifies the $PATH. The problem is that it prepends some default paths, such as /usr/bin, which contains another ruby binary.

What you can do to solve this is to use BASH for running the specs. This piece of code does the job:

(defadvice rspec-compile (around rspec-compile-around)
  "Use BASH shell for running the specs because of ZSH issues."
  (let ((shell-file-name "/bin/bash"))
    ad-do-it))
(ad-activate 'rspec-compile)

Contributing

Love RSpec and Emacs? Great, help out by contributing. The easiest way to contribute is to checkout the git project, make a change and then submit a pull request.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Update the version and changelog in the header of rspec-mode.el to reflect the change.
  • Send me a pull request. Bonus points for topic branches.

rspec-mode's People

Contributors

dgutov avatar pezra avatar timcharper avatar asok avatar rejeep avatar dgtized avatar pedz avatar ryanbriones avatar byplayer avatar textgoeshere avatar tomykaira avatar notfunc avatar niku avatar trevors avatar jhirn avatar jell avatar earakaki avatar daveyeu avatar ananthakumaran avatar alesya-h avatar

Watchers

Jason Milkins avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.