zentest

How ZenTest works in detecting file save?

I read some source code of ZenTest but didn't find where it is implemented. Could you give me give some clue? Thanks in advance. ...

Source code problem of ZenTest

Here is one method that monkey patched the Dir[] method from autotest class Dir class << self alias :old_index :[] def [](*args) $-w, old_warn = false, $-w old_index(*args) ensure $-w = old_warn end end end Could you please help by explain this line $-w, old_warn = false, $-w ? Thanks in advance. ...

"_" parameter of Ruby block

I met this when I read ZenTest source code: Here is the definition of add_mapping method: def add_mapping(regexp, &proc) @test_mappings << [regexp, proc] end In the Autottest.initailize(), add_method get called to add mapping for implementations. self.add_mapping(/^lib\/.*\.rb$/) do |filename, _| possible = File.basename(filenam...

A pretty GUI for autotest

I was wondering if anyone knows of any nice GUIs for autotest? I already know about all the plugins distributed with autotest (growl, knotify etc.), what I want is a little more. I would like a GUI that displays the total count of failed tests at all times. I would like the GUI to allow me to click through to the failing test (have t...

Autotest performance slowdown

I've been using ZenTest to run all the tests in my Rails project for years and it's always been quite nippy. However, on my Mac it has suddenly started taking 3 times as long to run all the tests. We have 1219 tests and for the past year it would run all the tests in around 300 seconds on average. Now though, it's taking almost 900 se...

Rails: using ZenTest / autospec to test specs in new directories

I am adding a directory for services classes in my rails application: app/services I would like to add specs for these classes in the directory: spec/services I added a spec to spec/services, but running autospec does not run the example. Is there a way to configure autospec to run examples in new directories? Thanks. ...

"autotest/rails [...] doesn't [...] exist. Aborting"

I'm finding that autotest has stopped working... $ autotest loading autotest/rails Autotest style autotest/rails doesn't seem to exist. Aborting. According to this blog post, the common reason for this error is that people don't have the autotest-rails gem installed. However, I definitely have that installed: autotest-rails (4.1.0) Z...

How to make rails autospec stop looping

I'm using autospec and when all tests are passing, the green messages pops up just once, but when the tests are NOT passing, it remains popping up infinite red windows in growl. Does anybody knows how to turn this off and make autospec run just after I save my files? I have a .autotest file in my home with these contents: require 'aut...

ZenTest autotest not running tests

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...

No colors when using autospec

When I'm using autospec to test a non-Rails Ruby project, I always have trouble getting my tests to show up red or green. When I run a regular 'spec spec/ --color' command I get normal red/green responses. I've tried putting all sorts of commands in the .autotest file and I can't get that to work. Also, in my Rails projects, I don't ge...

rake test finding tests. autotest not finding them

$ rake test $ rake test (in /Users/ethan/project/mtc/completestreets) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0...

Autotest not understanding namespacing

Most of my work in a rails application is done with rails engines. When I develop new applications, it usually use a custom built cms. My CMS was inspired by refineryCMS in that there is a core that lives as a rails engine. Features that make up the application are other rails engines that register themselves with the core. For example t...

How do I get autotest (ZenTest) to see my namespaced stuff?

Autotest is supposed to map my tests to a class, I believe. When I have class Foo and class FooTest, autotest should see FooTest and say, "Hey, this test corresponds to the unit Foo, so I'll look for changes there and re-run tests when changes occur." And that works, however... When I have Foo::Bar and Foo::BarTest, autotest doesn't see...

How can I tell autotest to not rerun all tests unless I explicitly tell it to?

Autotest will rerun all tests every time my tests start passing when they were failing. I have a lot of tests, and for reasons I won't go into, rerunning all of them is painfully slow. How can I make it so autotest will never rerun all tests unless I Ctrl-C? ...

how to run .feature + _spec.rb + _test.rb with autotest

In one of my project with some existing code, some code is covered by _test.rb file, other is by _spec.rb and we introduced .feature It became a nice mixture of stuff to check. I am stumped how to run .feature, _spec.rb and _test.rb for red-green cycles. ...

autotest shows blank

I installed the autotest gem and intend to use it with rspec. The problem is, when I run autotest under my rails app, all I see is : railsapp$ autospec loading autotest/rails_rspec And its stuck there until I Ctrl-C out of it. Nothing changes even if I change a rspec test or code. Here's my ~/.autotest require "auto...

Fastest rails test runner: spork and zentest?

I ran across a thread about slow rspec tests that made me wonder which rails test runner configuration will result in the fastest running recurring tests? I'm aware that ZenTest / autotest-rails can be used in conjunction with spork, but is that the fastest option? ...

Autospec does nothing when I run

I have failing tests that show up when I do a 'rake spec' or the like. However when I run autospec it outputs the following then does nothing and returns me to the command prompt. $ autospec (Not running features. To run features in autotest, set AUTOFEATURE=true.) loading autotest/rails_rspec style: RailsRspec How do I get auto...

rake spec cucumber complains about "no such file to load - ZenTest" despite ZenTest being installed

Hello! /home/soroush/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement no such file to load -- ZenTest /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/loca...

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

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 ...