zentest

“_” parameter of Ruby block

此生再无相见时 提交于 2020-01-13 20:22:28
问题 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(filename).gsub '_', '_?' files_matching %r%^test/.*#{possible}$% end My question is what "_", the second parameter of the block, means? Seems it is not used in the block.

“autotest/rails […] doesn't […] exist. Aborting”

梦想的初衷 提交于 2020-01-12 03:25:08
问题 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) ZenTest (4.1.4, 4.1.3, 4.1.1, 4.0.0, 3.11.1, 3.11.0, 3.10.0, 3.9.3, 3.9.2) I haven't installed any new gems today or yesterday, though I might have done a gem

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|

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

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 =~ /

Can't install ZenTest 4.8.4

◇◆丶佛笑我妖孽 提交于 2019-12-21 08:18:23
问题 When I try to install ZenTest: gem install ZenTest I get the following error: Invalid gemspec in [C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/specifications/ZenTest-4.8.4.gemspec]: Illformed requirement ["< 2.1, >= 1.8"] I tried cleaning up the gems and removing the ZenTest to no avail. What's wrong? 回答1: I've just spoken with Ryan Davis, the author of ZenTest. He tells me that this is due to a bug in RubyGems and they're preparing a release that fixes it. In the meantime, downgrade to 4

“_” parameter of Ruby block

ぐ巨炮叔叔 提交于 2019-12-06 12:44:17
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(filename).gsub '_', '_?' files_matching %r%^test/.*#{possible}$% end My question is what "_", the second parameter of the block, means? Seems it is not used in the block. Thanks It's an idiom used to indicate the the parameter bound to '_' is not used, even though it's

autotest problem

不打扰是莪最后的温柔 提交于 2019-12-05 03:08:33
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 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 =~ /^rspec/ } to # hacky_discovery = true This line was last modified in this commit: https://github.com/seattlerb

ZenTest autotest not running tests

社会主义新天地 提交于 2019-11-30 15:49:50
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| require f }" | unit_diff -u Loaded suite -e Started Finished in 0.000225 seconds. 0 tests, 0 assertions, 0