GithubHelp home page GithubHelp logo

zentest's Introduction

= ZenTest

home :: https://github.com/seattlerb/zentest
rdoc :: http://docs.seattlerb.org/ZenTest

== DESCRIPTION

ZenTest provides 4 different tools: zentest, unit_diff, autotest, and
multiruby.

zentest scans your target and unit-test code and writes your missing
code based on simple naming rules, enabling XP at a much quicker pace.
zentest only works with Ruby and Minitest or Test::Unit. There is
enough evidence to show that this is still proving useful to users, so
it stays.

unit_diff is a command-line filter to diff expected results from
actual results and allow you to quickly see exactly what is wrong.
Do note that minitest 2.2+ provides an enhanced assert_equal obviating
the need for unit_diff

autotest is a continous testing facility meant to be used during
development. As soon as you save a file, autotest will run the
corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great
for compatibility checking! Use multiruby_setup to manage your
installed versions.

*NOTE:* The next major release of zentest will not include autotest
(use minitest-autotest instead) and multiruby will use rbenv /
ruby-build for version management.

== FEATURES

* Scans your ruby code and tests and generates missing methods for you.
* Includes a very helpful filter for Test/Spec output called unit_diff.
* Continually and intelligently test only those files you change with autotest.
* Test against multiple versions with multiruby.
* Includes a LinuxJournal article on testing with ZenTest written by Pat Eyler.
* See also: http://blog.zenspider.com/archives/zentest/
* See also: http://blog.segment7.net/articles/category/zentest

== STRATEGERY

There are two strategeries intended for ZenTest: test conformance
auditing and rapid XP.

For auditing, ZenTest provides an excellent means of finding methods
that have slipped through the testing process. I've run it against my
own software and found I missed a lot in a well tested
package. Writing those tests found 4 bugs I had no idea existed.

ZenTest can also be used to evaluate generated code and execute your
tests, allowing for very rapid development of both tests and
implementation.

== AUTOTEST TIPS

Setting up your project with a custom setup is easily done by creating
a ".autotest" file in your project. Here is an example of adding some
plugins, using minitest as your test library, and running rcov on full
passes:

    require 'autotest/restart'

    Autotest.add_hook :initialize do |at|
      at.testlib = "minitest/autorun"
    end

    Autotest.add_hook :all_good do |at|
      system "rake rcov_info"
    end if ENV['RCOV']

Do note, since minitest ships with ruby19, if you want to use the
latest minitest gem you need to ensure that the gem activation occurs!
To do this, add the gem activation and the proper require to a
separate file (like ".minitest.rb" or even a test helper if you have
one) and use that for your testlib instead:

.minitest.rb:

    gem "minitest"
    require "minitest/autorun"

.autotest:

    Autotest.add_hook :initialize do |at|
      at.testlib = ".minitest"
    end

If you prefer to suffix test files with "_test.rb" (instead of the
default which prefixes test files with "test_") you can change the
mapping by installing the autotest-suffix plugin. To do this first
install the autotest-suffix gem:

    $ gem install autotest-suffix

Then add the following to the ".autotest" file:

    require "autotest/suffix"

If you prefer minitest/spec to minitest/unit, you can still use autotest
by installing the autotest-spec plugin.
To do this first install the autotest-spec gem:

    $ gem install autotest-spec

Then add the following to the ".autotest" file:

    require "autotest/spec"

== SYNOPSIS

  ZenTest MyProject.rb TestMyProject.rb > missing.rb

  ./TestMyProject.rb | unit_diff

  autotest

  multiruby_setup mri:svn:current
  multiruby ./TestMyProject.rb

== Windows and Color

Read this: http://blog.mmediasys.com/2010/11/24/we-all-love-colors/

== REQUIREMENTS

* Ruby 1.8+, JRuby 1.1.2+, or rubinius
* A test/spec framework of your choice.
* Hoe (development)
* rubygems, 1.8+
* diff.exe on windows. Use http://gnuwin32.sourceforge.net/packages.html

== INSTALL

* sudo gem install ZenTest

== LICENSE

(The MIT License)

Copyright (c) Ryan Davis, Eric Hodel, seattle.rb

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

zentest's People

Contributors

drbrain avatar zenspider avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zentest's Issues

autotest hanging for me

I tried to setup autotest on a pretty simple Ruby project this weekend, but couldn't seem to get it to run. It never seemed to produce any output, though it did respond to C-c.

I was using Ruby 2.0.0-p247 and RSpec. This was a non-Rails project. At least one other developer told me he's had the same issue lately, maybe since the 2.0 upgrade (he was just guessing on that last bit).

Conflict with Celluloid

After a recent update to a Rails app I'm working on, I found that I cannot load ZenTest and Celluloid together. Still tracking this down more specifically, but here's my initial backtrace:

vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:55:in `name': not in actor scope (Celluloid::NotActorError)
    from vendor/bundle/ruby/2.0.0/gems/ZenTest-4.9.5/lib/ZenTest.rb:13:in `block in <top (required)>'
    from vendor/bundle/ruby/2.0.0/gems/ZenTest-4.9.5/lib/ZenTest.rb:12:in `each_object'
    from vendor/bundle/ruby/2.0.0/gems/ZenTest-4.9.5/lib/ZenTest.rb:12:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from config/application.rb:7:in `<top (required)>'
    from config/environment.rb:2:in `require'
    from config/environment.rb:2:in `<top (required)>'
    from config.ru:3:in `require'
    from config.ru:3:in `block in <main>'
    from vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
    from vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
    from config.ru:1:in `new'
    from config.ru:1:in `<main>'

See also celluloid/celluloid#354

autotest no longer works with rubygems 2.0

I see this:

/Users/jdee/.rvm/gems/ruby-2.0.0-p247/gems/ZenTest-4.4.2/lib/autotest.rb:221:in `autodiscover': undefined method `source_index' for Gem:Module (NoMethodError)
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/gems/ZenTest-4.4.2/lib/autotest.rb:145:in `runner'
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/gems/ZenTest-4.4.2/bin/autotest:7:in `<top (required)>'
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/bin/autotest:23:in `load'
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/bin/autotest:23:in `<main>'
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/jdee/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

And

http://stackoverflow.com/questions/15349869/undefined-method-source-index-for-gemmodule-nomethoderror

Indicates that Gem.source_index was removed in rubygems 2.0.

Apologies if this is a dupe. I didn't see another issue for this.

autotest/restart doesn't work

When I change .autotest file nothing happens. The following is it's content.

require "autotest/restart"
require "autotest/fsevent"

I have tested this on ZenTest 4.5.0, 4.6.2, 4.7.0 with Ruby 1.9.3-p0 and 4.6.2, 4.7.0 with Ruby 1.9.3-p125. I thought it worked before but in fact I was using a binary from autotest-standalone 4.5.9 which works now as well.

Dependency on RubyGems 1.8

Hi,

Does zentest really need to depend on RubyGems 1.8? Pointless warning messages drive me up the wall and they just get worse with every RubyGems release, so most of the time I install slimgems, which usually works great. Unfortunately it causes the following error when installing ZenTest:

$ gem install ZenTest
ERROR:  Error installing ZenTest:
        ZenTest requires SlimGems version ~> 1.8. Try 'gem update --system' to update SlimGems itself.

SlimGems is based on a stable 1.3.7 branch. Any chance it could depend on ~> 1.3 instead?

Cheers, sam

ZenTest gem doesn't install due to invalid gemspec file

$ gem install ZenTest

Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Successfully installed ZenTest-4.8.4
1 gem installed
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Installing ri documentation for ZenTest-4.8.4...
Installing RDoc documentation for ZenTest-4.8.4...

$ autotest
Invalid gemspec in [/home/demo/.rvm/gems/ruby-1.9.3-p374/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
/home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in to_specs': Could not find ZenTest (>= 0) amongst [bundler-1.2.3, rake-10.0.3, rubygems-bundler-1.1.0, rvm-1.11.3.6] (Gem::LoadError) from /home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:into_spec'
from /home/demo/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in gem' from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/autotest:18:in

'
from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in eval' from /home/demo/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in'

Erroneous dependency on Rubygems 1.8 message

Hi,

I'm running into a scenario where I'm using Rubygems 1.8.17, but when I try to install ZenTest, I get the following message:

Gem::InstallError: ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself.
An error occured while installing ZenTest (4.7.0), and Bundler cannot continue.
Make sure that`gem install ZenTest -v '4.7.0'` succeeds before bundling.
computer:client mnyon$ gem -v
1.8.17
computer:client mnyon$ 

Illformed requirement in 4.8.4

I'm getting the following error when I try to install ZenTest 4.8.4:

Invalid gemspec in [/path/to/file/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

I couldn't find your gemspec file in the repo, otherwise I would've made a pull request, but the line that is the problem is line 7 in the gemspec in the Gem::Requirements.new call. It should be formatted as follows:

s.required_rubygems_version = Gem::Requirement.new(["< 2.1",">= 1.8"]) if s.respond_to? :required_rubygems_version=

http://rubygems.rubyforge.org/rubygems-update/Gem/Requirement.html#method-c-new

autotest fails to run tests when Gem name starts with "doc"

Executing 'autotest' just gives the response 'loading autotest/rspec2' but no test runs.

The culprit looks to be the gem name; after lots of trial and error I found that when the name starts with "doc" autotest fails to run any tests. Change the name to something else and it runs okay. I can reproduce the failure using this process;

  1. $ bundle gem docmunch
  2. Add rspec, autotest-growl, zentest (4.8.2 & 4.9 tried) dependencies in gemsepc.
  3. $ bundle install
  4. $ rspec --init
  5. create a simple hello world test on main lib/docmunch.rb
  6. running "autotest" gives "loading autotest/rspec2" in terminal

No further output was produced even after saving the .rb or _spec.rb files.

Autotest throws ArgumentError on must_be expectation using jruby

The simplest way to reproduce:

gem 'minitest'
require 'minitest/autorun'

class A
  def ok?
    true
  end
end

describe A do
  before do
    @a = A.new
  end

  it "should not induce an error" do
    @a.must_be :ok?
  end
end

$ jruby -I.:lib:test test/test_a.rb passes but with autotest it fails with the following error:

$ autotest --verbose
No tests matched .autotest
/home/***/.rvm/rubies/jruby-1.7.3/bin/jruby -I.:lib:test -rubygems -e "%w[minitest/spec test/test_a.rb].each { |f| require f }"
Run options: --seed 35676

Running tests:

E

Finished tests in 0.010000s, 100.0000 tests/s, 0.0000 assertions/s.

  1. Error:
    test_0001_should_not_induce_an_error(A):
    ArgumentError: wrong number of arguments calling assert_operator (2 for 3)
    (eval):4:in must_be' /home/***/minispecs/test/test_a.rb:16:intest_0001_should_not_induce_an_error'
    org/jruby/RubyBasicObject.java:1677:in `send'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

MRI works as expected in both cases.

jruby 1.7.3
ZenTest 4.9.0
rubygems 2.0
Minitest 4.6.2

UTF-8 encoding error

I'm unable to run autotest correctly due to a problem with encoding.

After run autotest:


Unhandled exception: ArgumentError: invalid byte sequence in UTF-8

....../gems/ZenTest-4.5.0/lib/autotest.rb:842:in `block in ': undefined method `backtrace' for ArgumentError: invalid byte sequence in UTF-8:Array (NoMethodError)

I use Ruby 1.9.2, ZenTest 4.5.0, autotest-rails 4.1.1 ...

I tried to use ZenTest 4.6.2 but I got another different error: Autotest style autotest/rails doesn't seem to exist. Aborting

Any idea? Thanks

missing .autotest file

Not sure if this is related: #7 (comment)

I get this error when I remove the project specific .autotest file

Unhandled exception: [#<Errno::ENOENT: No such file or directory>]
/home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:846:in `block in <class:Autotest>': undefined method `backtrace' for [#<Errno::ENOENT: No such file or directory>]:Array (NoMethodError)
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:832:in `[]'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:832:in `block in hook'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:832:in `each'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:832:in `any?'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:832:in `hook'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:344:in `rescue in run'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:320:in `run'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/lib/autotest.rb:241:in `run'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/gems/ZenTest-4.6.0/bin/autotest:6:in `<top (required)>'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/bin/autotest:19:in `load'
    from /home/bhenderson/.rvm/gems/ruby-1.9.2-p180/bin/autotest:19:in `<main>'

autotest doesn't allow for using gem 'minitest'

even after setting testlib = 'minitest/unit', the ruby command that is run is:

ruby -I.:lib:test -rubygems -e "%w[minitest/unit...

which doesn't allow the user to specify the gem version of minitest/unit (rather than the included one in 1.9.x)
(I wanna use your cool new assert_equal diffing :)

thanks,

man pages for the commandline programs

Debian requires every executable in /usr/bin to have a man page, so I created man pages for executables zentest provides. You can see it at

http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-zentest.git;a=tree;f=debian;h=0d9f3172756ce443c5f4bdbb5a750bf9d08e6710;hb=HEAD

man pages are generated by pod2man tool, you can see its options at http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-zentest.git;a=blob;f=debian/rules;h=6debab048df953d42bc33a7cab39eb6b50b9d6fd;hb=HEAD

If you like it feel free to include it in your gem so that other users of your gem outside debian also can use them.

remove default :died hook in autotest.

I don't think the default :died hook is necessary. If there is an error that isn't handled, it spits out the details anyway and there is no way to add a :died hook before yours so that an error can be "handled"

what do you think?

I feel like I'm wording this wrong, so if it doesn't make sense, let me know and I'll try again.

thanks,

`require': cannot load such file -- ubygems (LoadError)

After ruby update my favorite autotest feature stopped working, with a following error:

$ autotest
/Users/sk/.rvm/rubies/ruby-2.6.3/bin/ruby -I.:lib:test -rubygems -e "gem 'minitest'; %w[minitest/autorun test/jobs/product_update_job_test.rb test/services/product_add_parent_test.rb test/controllers/storefront/feed_controller_test.rb test/system/storefronts_test.rb test/lib/parsers/item_test.rb test/services/similar_products_query_test.rb test/services/amazon_lookup_test.rb test/helpers/storefront_helper_test.rb test/models/client_test.rb test/controllers/product_categories_controller_test.rb test/controllers/home_controller_test.rb test/helpers/application_helper_test.rb test/forms/settings_form_test.rb test/forms/category_form_test.rb test/controllers/store_selector_test.rb test/lib/amazon_order_validator_test.rb test/controllers/storefront/products_controller_test.rb test/controllers/categories_controller_test.rb test/controllers/clients_controller_test.rb test/presenters/product_variation_presenter_test.rb test/test_helper.rb test/controllers/domains_test.rb test/models/service_message_test.rb test/forms/new_store_form_test.rb test/controllers/api/cart_controller_test.rb test/forms/new_client_form_test.rb test/controllers/callbacks_controller_test.rb test/jobs/heroku_domain_job_test.rb test/forms/category_add_products_test.rb test/models/order_test.rb test/controllers/stores_controller_test.rb test/forms/search_form_test.rb test/lib/parsers/variations_test.rb test/services/category_remove_test.rb test/services/order_service_test.rb test/presenters/products_grid_presenter_test.rb test/lib/product_advertising_test.rb test/services/search_service_test.rb test/models/store_test.rb test/services/product_add_test.rb test/services/product_update_test.rb test/jobs/store_update_job_test.rb test/models/product_test.rb test/lib/parsers/data_test.rb test/controllers/search_controller_test.rb test/views/storefront_test.rb test/services/products_without_category_query_test.rb test/system/landing_test.rb test/serializers/product_lookup_serializer_test.rb test/controllers/storefront/categories_controller_test.rb test/controllers/products_controller_test.rb test/models/product_variation_test.rb test/serializers/merchant_feed_serializer_test.rb test/controllers/storefront_controller_test.rb].each { |f| require f }" -- --server 30119
Traceback (most recent call last):
	1: from /Users/sk/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/sk/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- ubygems (LoadError)

I've noticed similar issue in minitest-autotest gem minitest/minitest-autotest#14

But it seems that autotest iteself contains similar code:

"#{prefix}#{ruby} -I#{libs} -rubygems"

Workaround

I downgraded ruby to 2.5.* version and it worked.

My environment:

$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]

Gemfile

GIT
  remote: https://github.com/thepracticaldev/fix-db-schema-conflicts.git
  revision: 4172392392e1a8d907f7ab673cb5ddd9a4a31940
  branch: master
  specs:
    fix-db-schema-conflicts (3.0.2)
      rubocop (>= 0.38.0)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.2.3)
      actionpack (= 5.2.3)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailer (5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.2.3)
      actionview (= 5.2.3)
      activesupport (= 5.2.3)
      rack (~> 2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.2.3)
      activesupport (= 5.2.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.2.3)
      activesupport (= 5.2.3)
      globalid (>= 0.3.6)
    activemodel (5.2.3)
      activesupport (= 5.2.3)
    activerecord (5.2.3)
      activemodel (= 5.2.3)
      activesupport (= 5.2.3)
      arel (>= 9.0)
    activestorage (5.2.3)
      actionpack (= 5.2.3)
      activerecord (= 5.2.3)
      marcel (~> 0.3.1)
    activesupport (5.2.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    acts-as-taggable-array-on (0.5.1)
      activerecord (>= 4)
      activesupport (>= 4)
    addressable (2.6.0)
      public_suffix (>= 2.0.2, < 4.0)
    ansi (1.5.0)
    arel (9.0.0)
    ast (2.4.0)
    bcrypt (3.1.12)
    bindex (0.7.0)
    builder (3.2.3)
    bulma-extensions-rails (1.0.30)
    bulma-rails (0.7.4)
      sass (~> 3.5)
    bulmajs-rails (0.3.3)
    byebug (11.0.1)
    capybara (3.17.0)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (~> 1.2)
      xpath (~> 3.2)
    childprocess (1.0.1)
      rake (< 13.0)
    cliver (0.3.2)
    coderay (1.1.2)
    concurrent-ruby (1.1.5)
    connection_pool (2.2.2)
    crack (0.4.3)
      safe_yaml (~> 1.0.0)
    crass (1.0.4)
    curb (0.9.10)
    devise (4.6.2)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0, < 6.0)
      responders
      warden (~> 1.2.3)
    discard (1.0.0)
      activerecord (>= 4.2, < 6)
    dotenv (2.7.2)
    dotenv-rails (2.7.2)
      dotenv (= 2.7.2)
      railties (>= 3.2, < 6.1)
    erubi (1.8.0)
    erubis (2.7.0)
    excon (0.64.0)
    execjs (2.7.0)
    ffi (1.10.0)
    flamegraph (0.9.5)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    hashdiff (0.3.8)
    hashie (3.6.0)
    heroics (0.0.25)
      erubis (~> 2.0)
      excon
      moneta
      multi_json (>= 1.9.2)
    heroku-deflater (0.6.3)
      rack (>= 1.4.5)
    high_voltage (3.1.0)
    honeybadger (4.2.1)
    i18n (1.6.0)
      concurrent-ruby (~> 1.0)
    jaro_winkler (1.5.2)
    jeff (2.0.0)
      excon (>= 0.22.1)
    launchy (2.4.3)
      addressable (~> 2.3)
    letter_opener (1.7.0)
      launchy (~> 2.2)
    libv8 (3.16.14.19)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.2.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (0.3.3)
      mimemagic (~> 0.3.2)
    marginalia (1.8.0)
      actionpack (>= 2.3)
      activerecord (>= 2.3)
    memory_profiler (0.9.13)
    method_source (0.9.2)
    mimemagic (0.3.3)
    mini_mime (1.0.1)
    mini_portile2 (2.4.0)
    minispec-metadata (2.0.0)
      minitest
    minitest (5.11.3)
    minitest-autotest (1.0.3)
      minitest-server (~> 1.0)
    minitest-reporters (1.3.6)
      ansi
      builder
      minitest (>= 5.0)
      ruby-progressbar
    minitest-server (1.0.5)
      minitest (~> 5.0)
    minitest-vcr (1.4.0)
      minispec-metadata (~> 2.0)
      minitest (>= 4.7.5)
      vcr (>= 2.9)
    moneta (1.0.0)
    multi_json (1.13.1)
    multi_xml (0.6.0)
    mustermann (1.0.3)
    nanoid (2.0.0)
    nio4r (2.3.1)
    nokogiri (1.10.2)
      mini_portile2 (~> 2.4.0)
    orm_adapter (0.5.0)
    parallel (1.17.0)
    parser (2.6.2.1)
      ast (~> 2.4.0)
    pg (1.1.4)
    pgrel (0.3.0)
      activerecord (>= 4.0)
    platform-api (2.2.0)
      heroics (~> 0.0.25)
      moneta (~> 1.0.0)
    poltergeist (1.18.1)
      capybara (>= 2.1, < 4)
      cliver (~> 0.3.1)
      websocket-driver (>= 0.2.0)
    pry (0.12.2)
      coderay (~> 1.1.0)
      method_source (~> 0.9.0)
    pry-byebug (3.7.0)
      byebug (~> 11.0)
      pry (~> 0.10)
    pry-rails (0.3.9)
      pry (>= 0.10.4)
    psych (3.1.0)
    public_suffix (3.0.3)
    puma (3.12.1)
    rack (2.0.7)
    rack-attack (6.0.0)
      rack (>= 1.0, < 3)
    rack-cors (1.0.3)
    rack-mini-profiler (1.0.2)
      rack (>= 1.2.0)
    rack-protection (2.0.5)
      rack
    rack-proxy (0.6.5)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (5.2.3)
      actioncable (= 5.2.3)
      actionmailer (= 5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      activemodel (= 5.2.3)
      activerecord (= 5.2.3)
      activestorage (= 5.2.3)
      activesupport (= 5.2.3)
      bundler (>= 1.3.0)
      railties (= 5.2.3)
      sprockets-rails (>= 2.0.0)
    rails-controller-testing (1.0.4)
      actionpack (>= 5.0.1.x)
      actionview (>= 5.0.1.x)
      activesupport (>= 5.0.1.x)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.4)
      loofah (~> 2.2, >= 2.2.2)
    railties (5.2.3)
      actionpack (= 5.2.3)
      activesupport (= 5.2.3)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.19.0, < 2.0)
    rainbow (3.0.0)
    rake (12.3.2)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    redis (4.1.0)
    ref (2.0.0)
    regexp_parser (1.4.0)
    responders (2.4.1)
      actionpack (>= 4.2.0, < 6.0)
      railties (>= 4.2.0, < 6.0)
    rubocop (0.67.2)
      jaro_winkler (~> 1.5.1)
      parallel (~> 1.10)
      parser (>= 2.5, != 2.5.1.1)
      psych (>= 3.1.0)
      rainbow (>= 2.2.2, < 4.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 1.4.0, < 1.6)
    ruby-progressbar (1.10.0)
    ruby_dep (1.5.0)
    ruby_http_client (3.3.0)
    rubyzip (1.2.2)
    safe_yaml (1.0.5)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    selenium-webdriver (3.141.5926)
      childprocess (>= 0.5, < 2.0)
      rubyzip (~> 1.2, >= 1.2.2)
    sendgrid-ruby (5.3.0)
      ruby_http_client (~> 3.3.0)
      sinatra (>= 1.4.7, < 3)
    sidekiq (5.2.6)
      connection_pool (~> 2.2, >= 2.2.2)
      rack (>= 1.5.0)
      rack-protection (>= 1.5.0)
      redis (>= 3.3.5, < 5)
    sinatra (2.0.5)
      mustermann (~> 1.0)
      rack (~> 2.0)
      rack-protection (= 2.0.5)
      tilt (~> 2.0)
    single_test (0.6.0)
      rake
    snake_case_hash (1.0.4)
      hashie (~> 3.0)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    stackprof (0.2.12)
    strong_migrations (0.3.1)
      activerecord (>= 3.2.0)
    terminal-notifier (2.0.0)
    therubyracer (0.12.3)
      libv8 (~> 3.16.14.15)
      ref
    thor (0.20.3)
    thread_safe (0.3.6)
    tilt (2.0.9)
    turbolinks (5.2.0)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.1.20)
      execjs (>= 0.3.0, < 3)
    unicode-display_width (1.5.0)
    vacuum (2.1.1)
      jeff (~> 2.0)
      multi_xml (~> 0.6.0)
    vcr (4.0.0)
    warden (1.2.8)
      rack (>= 2.0.6)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    webmock (3.5.1)
      addressable (>= 2.3.6)
      crack (>= 0.3.2)
      hashdiff
    webpacker (4.0.2)
      activesupport (>= 4.2)
      rack-proxy (>= 0.6.1)
      railties (>= 4.2)
    websocket-driver (0.7.0)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.3)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    yard (0.9.19)

PLATFORMS
  ruby

DEPENDENCIES
  acts-as-taggable-array-on
  builder (~> 3.2)
  bulma-extensions-rails
  bulma-rails
  bulmajs-rails
  byebug
  capybara
  curb
  devise
  discard
  dotenv-rails
  fix-db-schema-conflicts!
  flamegraph
  heroku-deflater
  high_voltage
  honeybadger
  letter_opener
  listen (>= 3.0.5, < 3.2)
  marginalia
  memory_profiler
  minitest
  minitest-autotest
  minitest-reporters
  minitest-vcr
  nanoid
  pg
  pgrel (~> 0.2)
  platform-api
  poltergeist
  pry-byebug
  pry-rails
  puma (~> 3.7)
  rack-attack
  rack-cors
  rack-mini-profiler
  rails (~> 5.2)
  rails-controller-testing
  redis
  rubocop
  selenium-webdriver
  sendgrid-ruby
  sidekiq
  single_test
  snake_case_hash
  stackprof
  strong_migrations
  terminal-notifier
  therubyracer
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  vacuum
  web-console (>= 3.3.0)
  webmock
  webpacker
  yard

RUBY VERSION
   ruby 2.6.3p62

BUNDLED WITH
   1.17.3

Bad gemspec in 4.9.0

% bundle exec rake app:start
Invalid gemspec in [/home/emmanuel/.gem/ruby/1.9.3/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/emmanuel/talemetry/talemetry_warehouse/vendor/ruby/1.9.1/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/emmanuel/talemetry/talemetry_warehouse/vendor/ruby/1.9.1/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
Invalid gemspec in [/home/emmanuel/talemetry/talemetry_warehouse/vendor/ruby/1.9.1/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

Error installing with ruby 1.9.2p290

I'm having trouble installing ZenTest with ruby 1.9.2p290

I think it may be related to an issue I saw on the draper project but am new to ruby and am not sure.

Here is my debug on install:

Exception `NoMethodError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1495 - undefined method `to_ary' for #<Gem::Specification name=ZenTest version=4.8.1>
Exception `NoMethodError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1495 - undefined method `to_ary' for #<Gem::Specification name=ZenTest version=4.8.1>
Exception `Errno::EEXIST' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/fileutils.rb:243 - File exists - /Users/chris/.rvm/gems/ruby-1.9.2-p290
Exception `NoMethodError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:57 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x007fa2da446810>
Exception `NoMethodError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:577 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x007fa2da446810>
Exception `NoMethodError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:577 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x007fa2da446810>
Exception `Zlib::GzipFile::Error' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:577 - unexpected end of file
Exception `Gem::InstallError' at /Users/chris/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:215 - gzip error installing /Users/chris/.rvm/gems/ruby-1.9.2-p290/cache/ZenTest-4.8.1.gem
ERROR:  Error installing ZenTest:
    gzip error installing /Users/chris/.rvm/gems/ruby-1.9.2-p290/cache/ZenTest-4.8.1.gem

Illformed requirement ["< 2.1, >= 1.8"]

Travis on our project with new ZenTest (4.8.4) fails with:

Invalid gemspec in [/home/travis/.rvm/gems/ruby-1.9.3-p327/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

This happen both with ruby 1.8 and 1.9.3.

Rolling back to previous version of ZenTest resolve this issue.

Invalid gemspec under JRuby

This affects 4.8.4 and 4.9.0. I haven't checked 4.8.3, but 4.8.2 works fine.

Invalid gemspec in [/Users/dw/.rvm/gems/jruby-1.7.0/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
$ ruby -v
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on Java HotSpot(TM) 64-Bit Server VM 1.6.0_39-b04-442-10M4008 [darwin-x86_64]
$ gem -v
1.8.24

zentest proxy gem

mind releasing a proxy gem as "zentest" the case sensitivity is killing me?

stack level too deep

After doing some upgrades (rubygems 1.8.8, zentest 4.6.1, autotest 4.4.6, ruby 1.9.2p290) autotest won't run anymore, and dies with a very unhelpful error message:

Unhandled exception: stack level too deep
/Users/user/.rvm/gems/ruby-1.9.2-p290/gems/ZenTest-4.6.1/lib/autotest.rb:589
Quitting
/Users/user/.rvm/gems/ruby-1.9.2-p290/bin/autotest:19: stack level too deep (SystemStackError)

I looked at line 589 of autotest.rb, and don't really see anything on that line that would cause a stack level error. I'm sure this isn't enough information to debug, so if you can tell me what other information would be helpful I'll be happy to provide it. I'm just not sure where to start.

Thanks!

zentest 4.11.0 fails test with ruby 2.3

With ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux] I see the following test failure:

  1) Failure:
TestZenTest#test_testcase9 [/var/tmp/portage/dev-ruby/zentest-4.11.0/work/all/zentest-4.11.0/test/test_zentest.rb:570]:
--- expected
+++ actual
@@ -10,6 +10,10 @@
     raise NotImplementedError, 'Need to write test_carat'
   end

+  def test_equals3
+    raise NotImplementedError, 'Need to write test_equals3'
+  end
+
   def test_or
     raise NotImplementedError, 'Need to write test_or'
   end
@@ -19,4 +23,4 @@
   end
 end

-# Number of errors detected: 4"
+# Number of errors detected: 5"

Invalid Gemspec generated with Zentest 4.9.0

Invalid gemspec in [../.rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.0.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]

The correct requirement seems to be ["< 2.1", ">= 1.8"]

The double quotes are missing.

I am using Ruby-1.9.3 just incase you need to know that.

NoMethodError: undefined method `maglev?'

I observe the following test error:

  1) Error:
test_testcase9(TestZenTest):
NoMethodError: undefined method `maglev?' for #<TestZenTest:0x000000017680d0>
    /builddir/build/BUILD/rubygem-ZenTest-4.9.0/usr/share/gems/gems/ZenTest-4.9.0/test/test_zentest.rb:559:in `test_testcase9'
105 tests, 262 assertions, 0 failures, 1 errors, 0 skips
ruby -v: ruby 2.0.0dev (2013-02-14 trunk 39237) [x86_64-linux]

Seems to be caused by 6c96ec8. Not sure where the #magev? method should come from.

autotest stops running tests after the last failing test succeeds

When I fix the last failing test in my test suite, autotest stops running tests. It looks like it can't map the files to tests anymore. The last bit of the output when running it with -v is:

{"test/controllers/keys_controller_test.rb"=>2014-08-15 12:09:13 -0400}
/usr/bin/ruby1.9.1 -I.:lib:test -rubygems -e "gem 'minitest'; %w[minitest/autorun test/controllers/keys_controller_test.rb].each { |f| require f }"
Run options: --seed 22324

# Running:



Finished in 0.000738s, 0.0000 runs/s, 0.0000 assertions/s.

0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
{"test/controllers/keys_controller_test.rb"=>2014-08-15 12:09:13 -0400}
/usr/bin/ruby1.9.1 -I.:lib:test -rubygems -e "gem 'minitest'; %w[minitest/autorun test/controllers/keys_controller_test.rb].each { |f| require f }"
Run options: --seed 17636

# Running:

E.

Finished in 0.491539s, 4.0688 runs/s, 16.2754 assertions/s.

  1) Error:
KeysControllerTest#test_Should_not_return_expired_keys_for_the_requested_user_and_host:
NoMethodError: undefined method `created_at' for nil:NilClass
    test/controllers/keys_controller_test.rb:79:in `block in <class:KeysControllerTest>'

2 runs, 8 assertions, 0 failures, 1 errors, 0 skips
{"test/controllers/keys_controller_test.rb"=>2014-08-15 12:09:26 -0400}
/usr/bin/ruby1.9.1 -I.:lib:test -rubygems test/controllers/keys_controller_test.rb -n "/^(test_Should_not_return_expired_keys_for_the_requested_user_and_host)$/"
{"test/controllers/keys_controller_test.rb"=>2014-08-15 12:09:26 -0400}
/usr/bin/ruby1.9.1 -I.:lib:test -rubygems test/controllers/keys_controller_test.rb -n "/^(test_Should_not_return_expired_keys_for_the_requested_user_and_host)$/"
Run options: -n "/^(test_Should_not_return_expired_keys_for_the_requested_user_and_host)$/" --seed 36913

# Running:

.

Finished in 0.385816s, 2.5919 runs/s, 15.5515 assertions/s.

1 runs, 6 assertions, 0 failures, 0 errors, 0 skips
{"test/controllers/keys_controller_test.rb"=>2014-08-15 12:09:26 -0400}
No tests matched test/controllers/keys_controller_test.rb

Can't find executable autotest

Don't know if this is ZenTest issue or respec-autotest integration issue, but on Ubuntu
18.04.3 LTS (Bionic Beaver), using ruby 2.6.6, sinatra 2.0.2, rspec 3.3.0, rspec-autotest 1.0.0, and ZenTest 4.12.0, all bundled with Bundler version 1.17.3, I get the following error when issuing the command bundle exec autotest: /usr/share/rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0/bundler/rubygems_integration.rb:462:in `block in replace_bin_path': can't find executable autotest for gem ZenTest (Gem::Exception)
Any ideas?

Question

So when I use bundler based on the #30 and #32 I have to install the gem first (and do system update of rubygems). But

The biggest issue I use DM and the following dependencies appears
DataMapper => ParseTree => RubyInline => ZenTest

But I should not have to install ZenTest as I don t run test nor do I use it in any of my code. when I use other gem , they install their dependencies fine within bundler and the vendor path I specify. so what is so special about ZenTest that for bundler it also has to be installed first as a normal gem?

"Unable to map class ... to a file"

Having a bit of trouble mapping files and looking for guidance.

The project I'm adding autotest to has a test/unit/filters directory and a lib/auto_html/filters directory...

Mapping is setup like so:

require 'autotest/growl'
require 'autotest/fsevent'
require 'redgreen'

Autotest.add_hook :initialize do |at|
  unless ARGV.empty?
    at.find_directories = ARGV
  else
    # Clear all mappings
    #at.clear_mappings

    # Ignore these files
    %w(
      .hg .git .svn stories tmtags 
      Gemfile Rakefile Capfile README 
      .html app/assets config .keep
      spec/spec.opts spec/rcov.opts vendor/gems vendor/ruby 
      autotest svn-commit .DS_Store
    ).each { |exception|at.add_exception(exception) }

    at.add_mapping(%r{^lib/auto_html/filters/.*\.rb$}) do |f, _|
      at.files_matching %r{^test/unit/filters/.*_test\.rb$}
    end

    # Now add support for the test files themselves
    at.add_mapping(%r%^test/(.*)/(.*)\.rb$%) do |file, m|
      at.files_matching %r%#{file}%
    end

  end
end

Seems to work well enough, until the end of the run...then it pukes out a bunch of this if tests fail:

Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/dailymotion_test.rb:7 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/dailymotion_test.rb:17 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/dailymotion_test.rb:12 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/liveleak_test.rb:7 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/liveleak_test.rb:12 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/vimeo_test.rb:22 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/vimeo_test.rb:47 to a file
Unable to map class /Users/seth/Work/_gems/auto_html/test/unit/filters/vimeo_test.rb:17 to a file
Unable to map class 

Wondering a couple things...

  • What am I doing wrong?
  • Is there a verbose way to make autotest spit out exactly what it's mapping?

zentest doesn't seem to do anything

I have a file that contains a class definition, when I run:

zentest models/myclass.rb

It looks very much like the same output as if I run

ruby -w models/myclass.rb

and no tests are generated. The file also seems to be executed rather than inspected. What up with that ?

Illformed requirement ["< 2.1, >= 1.8"]

Illformed requirement ["< 2.1, >= 1.8"]
Could not find ZenTest-4.9.1 in any of the sources

Just not sure why this happened when I trying to start rails server.

When `--backtrace` is on and `Time.parse` is used to dynamically generate the name of an example, `autotest` is unable to re-run the failing specs because the first argument to `rspec` is malformed.

This is the weirdest rspec/autotest bug I have seen. I'm not sure if the bug is in autotest or in part of rspec; it's beyond my RSpec-fu to narrow it down that far. I had opened this as an issue on rspec-dev, but @JonRowe looked into it and believes it's an autotest issue.

A minimal and heavily documented test case to reproduce it is at http://github.com/armandofox/rspec-backtrace

In a nutshell:

  • When I try to dynamically generate the name of an example for 'specify' by calling Time.parse, and that example fails, autotest is unable to successfully re-run rspec because it mangles the command line arguments
  • BUT, if the --backtrace option is removed from .rspec, the problem goes away
  • OR, if the call to Time.parse is removed from the spec file, the problem also goes away.

`-w` doesn't turn on warnings

autotest -w doesn't throw ruby warnings

My test case:

require 'minitest/autorun'

class OmgTest < Minitest::Test
  def test_throw_warnings
    never_used = 1
    assert_equal 2, 2
  end
end

Running it with plain 'ol ruby

test % ruby -w test/omg_test.rb | grep -i warning
RUBY_GC_HEAP_INIT_SLOTS=1000000 (default value: 4096)
RUBY_GC_MALLOC_LIMIT=1000000000 (default value: 16777216)
test/omg_test.rb:5: warning: assigned but unused variable - never_used

With autotest

test % autotest -w | grep -i warning

Not a single warning was thrown

Unable to map class <filename> to a file

Since upgrading to rails 3/ruby 2, I've had and lived with this issue -

When tests fail, I see an error message like

Unable to map class /Users/jeff/dev/scholaric/test/functional/planning_controller_test.rb:2409 to a file

Then when I edit and save, the whole test runs again (or nothing runs), instead of the failed test case.

I'm using standard Test::Unit, and Gemfile.locked is

activesupport (> 3.2)
acts_as_list (= 0.1.4)
authlogic (
> 3.2)
autotest-rails
coffee-rails (> 3.2.1)
daemons
debugger
delayed_job_active_record
factory_girl_rails
jquery-rails
json (= 1.7.7)
mock_redis
netrc
newrelic_rpm
pg (
> 0.14)
rails (> 3.2)
rails_12factor
rake
redis
remit (= 2.0.1)
sass-rails (
> 3.2.6)
uglifier (>= 1.0.3)
unicorn
workless (~> 1.1.3)

I don't see that I've created a .autotest or .minitest config file.

Any ideas?

Conflicts with Ruby 2.1 and multi gem?

Setting up a new machine with an already existing project and getting this:

ZenTest's executable "multigem" conflicts with /Users/grimm/.rvm/rubies/ruby-2.1.0/bin/multigem
Overwrite the executable? [yN]  n
ERROR:  Error installing ZenTest:
"multigem" from ZenTest conflicts with /Users/grimm/.rvm/rubies/ruby-2.1.0/bin/multigem

I'm probably going to make 2.0 the default but just curious if this is something on your radar or something I've missed?

Pathname.new "ArgumentError: wrong number of arguments(1 for 0)"

When running autotest, I'm seeing a "ArgumentError: wrong number of arguments(1 for 0)" when running a unit test for code that uses Pathname.new.

Simple code to duplicate it is:

test/test_pathname.rb:

require 'minitest/autorun'

require_relative 'pathname'

class TestPathname < MiniTest::Test

  def test_foo
    foo = Pathname.new('./foo')
  end

end

and in the same directory:

test/pathname.rb:

require 'pathname'

class Pathname
end

I needed to extend Pathname with some new methods, and running autotest from the parent directory returns the exception telling me that Pathname.new('foo') has too many arguments.

Running the code from Ruby itself always passes:

LM127030-GFERG:network_config_maintainer gferguson$ ruby test/test_pathname.rb
Run options: --seed 31730

# Running:

.

Finished in 0.001285s, 778.2101 runs/s, 0.0000 assertions/s.

1 runs, 0 assertions, 0 failures, 0 errors, 0 skips

generating ci files

Can I buy a clue about what's going on? It seems like a straightforward thing to do but it's baffling me.

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.