简体   繁体   English

如何在Textmate中自动运行RSpec

[英]How to autorun RSpec in textmate

I am building a simple Sinatra app. 我正在构建一个简单的Sinatra应用程序。

I am using Textmate (1.5.11) and have successfully installed RSpec bundle ( https://github.com/rspec/rspec-tmbundle ) 我正在使用Textmate(1.5.11)并已成功安装RSpec捆绑包( https://github.com/rspec/rspec-tmbundle

Currently the RSpec Textmate bundle works fine but I don't like having to manually trigger the execution of all the tests in my spec folder. 目前,RSpec Textmate捆绑包可以正常工作,但是我不希望必须手动触发spec文件夹中所有测试的执行。

I have have guard-rspec already running (with growl notification) but I would like to trigger the Textmate RSpec bundle - it is a nice UI and displays all the test result info in a format I like. 我已经运行了guard-rspec(带有咆哮通知),但是我想触发Textmate RSpec软件包-这是一个不错的UI,并以我喜欢的格式显示所有测试结果信息。

Is there a way to configure Textmate + RSpec bundle to auto run whenever a .rb file is saved? 有没有一种方法可以将Textmate + RSpec捆绑软件配置为在保存.rb文件时自动运行?

Thanks. 谢谢。

You can go to http://ruby.railstutorial.org/chapters/static-pages#sec-guard to install Guard 您可以转到http://ruby.railstutorial.org/chapters/static-pages#sec-guard来安装Guard

3.6.2 Automated tests with Guard 3.6.2使用Guard进行自动化测试

then you can also add 然后您还可以添加

http://jam.im/blog/2013/02/11/mac-osx-notifications-with-guard/ http://jam.im/blog/2013/02/11/mac-osx-notifications-with-guard/

Mac OSX Notifications With Guard 带Guard的Mac OSX通知

so you don't have to use growl notification 因此您不必使用咆哮通知

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM