spork

debian+ruby1.9.2+rails3.0.3+spork+rspec+cucumber

久未见 提交于 2019-12-04 15:51:07
1. 安装debian 2. 安装ssh 3. ssh中文问题 4. 安装ruby 最新的1.9.2要自己安装 5. gem问题 zlib 6. 安装rails 7. 安装LAMP 1) sudo apt-get install php5 2) sudo apt-get install mysql-server mysql-client 3) sudo apt-get install php5-mysql php5-curl php5-gd 4) dpkg -l 'php5-*' 5) sudo apt-get install libapache2-mod-php5 php5-mysql 6) /etc/apache2/httdpd.conf 添加: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps 7) ln -s /etc/apache2/mods-available/php5.* /etc/apache2//mods-enabled 8) sudo apt-get install apache2-mpm-prefork 9) sudo apt-get install mcrypt php5-mcrypt 10) sudo /etc/init.d/apache2

Superclass mismatch, Struct, reloading and Spork

微笑、不失礼 提交于 2019-12-04 13:45:42
问题 Suppose there's the following class # derp.rb class Derp < Struct.new :id end When I load "./derp.rb" twice the program fails with TypeError: superclass mismatch for class Derp . Ok, this could be managed with require . But how can I reload such classes for each test run with Spork? require obviously won't work cause it caches the loaded files. 回答1: Struct.new is creating new class for your every load. irb(main):001:0> class Test1 < Struct.new :id; end nil irb(main):003:0> class Test1 <

No notification when guard-rspec is used with spork

左心房为你撑大大i 提交于 2019-12-04 12:52:13
I am working on ubuntu machine with Ruby-1.9.2 and rails-3.1.3. I am using guard-rspec for autotesting and spork as DRB server. When I run guard without spork, it shows the correct notifications. But guard with spork shows no notifications at all. Here is relevant part of my Gemfile group :test, :development do gem 'rake', '0.9.3.beta.1' gem 'turn' gem 'rspec-rails' gem 'rspec' gem 'guard-rspec' gem 'spork' gem 'webrat' gem 'rb-fchange' gem 'rb-fsevent' gem 'libnotify' end I know it is an old question, but found via Google and just struggle with same problem. Solution is quite easy. Use guard

Rails project using spork - always have to use spork?

限于喜欢 提交于 2019-12-02 18:38:08
If I am using spork in my rails project and have a spec_helper.rb file like this require 'spork' Spork.prefork do ... end Spork.each_run do ... end Does it mean I need to ALWAYS have spork running when I run my specs via rspec spec ? Meaning, if I haven't executed $ spork in a terminal window yet, does it mean my specs will not run properly? No. We have spork in our spec helper and we don't use it a lot of the time, since it slows the tests down overall on larger suites. We only run spork when we're rapidly iterating, running a small subset of the tests repeatedly during TDD. When spork is not

How do you get cucumber/guard to filter on tags like @wip?

大憨熊 提交于 2019-12-01 17:13:01
I'm running spork and guard and all has been going very well with my RSpec tests which were all run correctly. In order to speed up the tests I could successfully filter my RSpec tests with tags I placed in my .rspec file. .rspec --colour --debug --tag focus --tag now Unfortunately though I have not been able to filter my cucumber tags. Every time cucumber runs it runs either everything or just the file that changed. How can I get cucumber/spork/guard to respect tags like @wip, @now etc and run only those tests? Is there some equivalent to the .rspec file for cucumber tags? You could use a

Getting an uninitialized constant error with RSpec. Have no idea what's causing it

半城伤御伤魂 提交于 2019-12-01 02:11:26
I'm using RSpec for testing and when I left work Friday afternoon, my tests were passing. But when I went home and synced my repository, the tests failed on my laptop. Now back at work, the tests are failing still. Don't believe its my code since running rspec by itself returns an error and spork won't even start up. When I try to start Spork, I get the following error message: Using RSpec Loading Spork.prefork block... uninitialized constant ActionView::Template::Handlers::ERB::ENCODING_FLAG (NameError) /home/jeff/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.2.1/lib/rspec/core

Getting an uninitialized constant error with RSpec. Have no idea what's causing it

别说谁变了你拦得住时间么 提交于 2019-11-30 21:35:55
问题 I'm using RSpec for testing and when I left work Friday afternoon, my tests were passing. But when I went home and synced my repository, the tests failed on my laptop. Now back at work, the tests are failing still. Don't believe its my code since running rspec by itself returns an error and spork won't even start up. When I try to start Spork, I get the following error message: Using RSpec Loading Spork.prefork block... uninitialized constant ActionView::Template::Handlers::ERB::ENCODING_FLAG

How can I configure rspec to show output with spork?

喜你入骨 提交于 2019-11-30 20:55:49
I have spork running to speed up my tests but there is no output when I run them. Is there a configuration that I need to modify? Just ran into this as well, running on spork 1.0.0rc4 and rspec 2.14.1 / rspec-core 2.14.8 . As far as I could figure it out, the problem lies in the following: Spork configures the $stdout to point to localhost:port (drb client) so that all reporter output is sent to the drb client. This now happens after the Spork.prefork is ran. In my Spork.prefork block I was (naturally) doing RSpec.configure do |config|, and one of the config calls there (in particular config

How can I configure rspec to show output with spork?

北城余情 提交于 2019-11-30 05:34:02
问题 I have spork running to speed up my tests but there is no output when I run them. Is there a configuration that I need to modify? 回答1: Just ran into this as well, running on spork 1.0.0rc4 and rspec 2.14.1 / rspec-core 2.14.8 . As far as I could figure it out, the problem lies in the following: Spork configures the $stdout to point to localhost:port (drb client) so that all reporter output is sent to the drb client. This now happens after the Spork.prefork is ran. In my Spork.prefork block I

spork 0.9.2 and rspec 3.0.0 = uninitialized constant RSpec::Core::CommandLine (NameError)

南楼画角 提交于 2019-11-30 04:44:49
Im using spork 0.9.2 and rspec 3.0.0. When trying to run test rspec --drb I have an exception C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework/rspec.rb:11:in run_tests: uninitialized constant RSpec::Core::CommandLine (NameError) But when changing rspec version back to 2.6 - everything is OK. Has anyone faced the same issue? Is it possible to work around? The reason is that RSpec::Core::CommandLine was removed in Rspec3 https://github.com/rspec/rspec-core/blob/master/Changelog.md Merge RSpec::Core::CommandLine (never formally declared public) into RSpec: