autotest

Ruby Autotest with add_mapping

强颜欢笑 提交于 2020-01-05 05:10:24
问题 I am trying to add a hook in Autotest to trigger tests when javascript files are changed. Below the is the .autotest file I am using. The syntax seems to be correct, but nothing is happening when a javascript file is updated. The first hook works fine, the second does not. Autotest.add_hook :initialize do |at| at.add_mapping(%r%^spec/(selenium)/.*rb$%) { |filename, _| filename } at.add_mapping(%r%^public/(javascripts)/.*js$%) do |f, _| at.files_matching %r%^spec/(selenium)/.*rb$% end end 回答1:

ZenTest autotest not running tests

岁酱吖の 提交于 2019-12-30 05:16:12
问题 I've had problems with autotest before which I resolved by downgrading from ZenTest 4.1.4 to 4.1.3. $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] $ rails -v Rails 2.3.4 Currently I'm finding that on my Mac OS 10.6.1 Snow Leopard system, when I run $ autotest in my project no tests are run and I get this output... $ autotest /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb].each { |f|

Spork is repeatedly re-running failing tests in autotest

人走茶凉 提交于 2019-12-24 05:11:48
问题 I have a new project that I am trying to get up and running with rspec, autotest and spork. I am using: rails 3.0.4 rspec 2.5.0 spork 0.9.0.rc3 autotest 4.4.6 Spork seems to be loading fine (I get a message that it is listening on a port), but when I run autotest with a failing test, it reruns that test over and over. It should just run the test, see that it is failing and stop. Any idea why this behavior is happening? Also, once I make the failing tests pass, autotest stops as it should. If

Error running autotest on Windows 7 with Rails 3, Ruby 1.9.2

走远了吗. 提交于 2019-12-24 04:06:15
问题 Installing and running Rails 3 and Ruby 1.9.2 on Windows 7 went rather smooth. It's only now that I want to run autotest that I'm running into problems. The error looks frustratingly simple, but I can't figure out how to solve it. I have the following gems in my Gemfile: gem 'autotest' gem 'autotest-rails-pure' But then when I run bundle exec autotest , I get: loading autotest/rails style: Rails C:\bin\Ruby192\bin\ruby -I.;lib;test -rubygems -e "['test/unit', 'test/unit/helpers/users_helper

Adding custom directories (source and spec) to autotest in a Rails 3 project

坚强是说给别人听的谎言 提交于 2019-12-22 09:26:55
问题 I have a Rails 3 app that uses RSpec2 as my testing framework, and I'm able to use autotest to watch my model and spec directories for changes and re-run my spec suite when files change. I'd like to add a directory with some custom classes in it (RAILS_ROOT/lib/some_project/lib/ .rb) and their corresponding specs (RAILS_ROOT/spec/some_project/ _spec.rb) so that autotest will automatically pick up changes to all of those files and re-run as needed. How do I get autotest to watch these files in

autotest problem

时光怂恿深爱的人放手 提交于 2019-12-22 04:35:19
问题 I just installed Zentest 4.4.6 which includes autotest 4.4.6 and when I run autotest I get the following error: gems/ZenTest-4.6.0/lib/autotest.rb:226:in `autodiscover': undefined method `any?' for Gem::Specification:Class (NoMethodError) huh? it's like it reverted back to ruby without rails 回答1: I don't know japanese, but looking at http://d.hatena.ne.jp/hkj/20110724 I learned that you can make it work by changing line 226 from: # hacky_discovery = Gem::Specification.any? { |s| s.name =~ /

Is there an implementation of something like autotest-fsevent for windows?

那年仲夏 提交于 2019-12-21 12:24:53
问题 Basically it's an extension for autotest that listens for notification from OS and allows autotest not to scan for file changes permanently while testing only necessary changes. It saves CPU and disk use. 回答1: Windows provides an API for File Change Notification called FindFirstChangeNotification http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx It turns out that somebody already made a small ruby-bridge for this you might use for a starting point: http://blade.nagaokaut.ac.jp/cgi

How to combine autotest and spork in Rails testing?

馋奶兔 提交于 2019-12-18 11:30:26
问题 Autotest increases the speed at which tests run by running only the changed tests. But I want to push it even further by using spork to preload the Rails environment, so that I will get even faster feedback. Is this possible? Autotest : https://github.com/grosser/autotest Spork : http://github.com/timcharper/spork 回答1: ARTICLE1 mikbe has you covered! I would attempt to rephrase it here, but the post does such a great job. If you happen to be on OSX, there are also instructions to utilize

Selenium Webdriver 学习(1)--install

你。 提交于 2019-12-14 10:34:11
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> step 1 首先当然是安装,这边先要安装python www.python.org/download里面有两个版本可以选,一个是python3, 一个是python2,由于之前一直在用2,所以仍然选择2.7.11 step 2 安装setup-tools,这个工具在安装python第三方软件时非常有用 https://pypi.python.org/pypi/setuptools python setup.py install step 3 进入C:\Python27\Scripts easy_install pip step 4 进入C:\Python27\Scripts pip install selenium 此时python和selenium都已经安装完毕 创建第一个selenium脚本进行测试,在百度首页中查找python关键字 #encoding:utf-8 from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver = webdriver.Firefox() #初始化Firefox浏览器对象 driver.get("http://www.baidu.com")

autotest on ubuntu does nothing

我的梦境 提交于 2019-12-13 12:43:03
问题 Running either $autotest or $autotest -f gives the same result: # Waiting since [timestamp] Changing a controller or spec file just gets that line repeated (with a newer timestamp). If I try $autotest -v, it does not include the spec or controller among the list of files for which no tests match, which I suppose is good; but it doesn't show anything else besides the #waiting line. If I make a change to a spec or controller while running -v, the output is a hash repeated twice with {[path/to