spork

Spork error with bundle exec?

Deadly 提交于 2019-12-11 10:28:12
问题 Whenever I run spork , I am getting the following error: You have already activated spork 0.9.0.rc8, but your Gemfile requires spork 0.8.5. Consider using bundle exec. (Gem::LoadError) my gemfile: group :development, :test do gem "rspec" gem "rspec-rails" gem "factory_girl_rails" gem 'spork' gem 'webrat' gem 'awesome_print' gem 'vcr' gem 'fakeweb' end I have ran bundle update and gem update and even gem update --system but I am still seeing this error. running bundle exec spork works, but I

spork: command not found

亡梦爱人 提交于 2019-12-11 06:05:55
问题 I've just installed spork via adding the version to the gemfile and running bundle install. When I gem list I can see spork (0.8.4) so the gem is installed. Im still tyring to configure spork, so when I type spork --bootstrap or spork -v to get see the version i get spork: command not found Any ideas? 回答1: Wherever spork was installed isn't in your PATH , which is where your prompt looks for commands you type. 回答2: If you use a mac spork gets installed with all of your gems, aka at '/Library

Spork, Vagrant, and Rspec

回眸只為那壹抹淺笑 提交于 2019-12-11 02:37:40
问题 So, I'm working in a pretty complex development enviornment that is hard to replicate locally on my Mac, so we're using Vagrant boxes and Chef scripts to keep everyone on the same page. What I would like to do, is be able to run my RSpec tests locally (on the Mac), but have them connect to the DRb server (spork) running on the Vagrant box. In my Vagrantfile, I've done the following to forward the Spork port to the Mac host: config.vm.forward_port 8989, 8989 . I ssh into the Vagrant box, and

How to optimize Rails/Rspec load time on Windows to the order of seconds? (with or without spork)

笑着哭i 提交于 2019-12-11 00:32:17
问题 Background: I am using the RailsInstaller 2 package from Engine Yard, which means Ruby 1.9.2-p290 and Rails 3.1.1, on Windows 7 x64. Problem: While attempting the Ruby on Rails Tutorial and after getting autotest and spork to work as intended, it is clear while rspec reported that the tests finished in a few seconds, the actual time consumed is much greater than that and closer to half a minute, a far cry from the split-second response as observed in the screencasts. I am aware that most of

Spork + Minitest

自闭症网瘾萝莉.ら 提交于 2019-12-08 04:26:36
问题 Can anyone explain how to use Spork with Minitest. I see there's a spork-minitest gem, but it's not clear how to use it. 回答1: after you add it to your Gemfile, you can use the docs at https://github.com/sporkrb/spork and substitute in 'minitest'. so you can do spork minitest --bootstrap then to run tests, spork-minitest provides a testdrb which you can pass tests into so testdrb test/unit/something_test.rb 来源: https://stackoverflow.com/questions/9932384/spork-minitest

Rails: Cucumber not cleaning DB

谁都会走 提交于 2019-12-07 06:27:26
问题 I'm having some issues with cucumber & database transactions - specifically, when I run the test suite, database transactions are not cleaned afterwards. I'm running rails 3.1 with spork, postgres. Initially features/support/env.rb was set to use database_cleaner, but consistently got the following error on each call to the db: No database specified. Missing argument: database. (ArgumentError) /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0.rc4/lib/active_record/connection

Can spork work with rake tasks?

℡╲_俬逩灬. 提交于 2019-12-06 20:46:05
问题 Rake tasks suffer from the same problem as running tests: the Rails bootup process takes a long time before the task is even running. Is there a way to integrate spork and rake together? 回答1: You can use the irake gem which makes it possible to execute rake tasks from the console. Add this to Gemfile: gem 'irake' Then bundle and start console $ bundle install $ rails console ...and wait for the Rails environment to load (only once). Then you can do: rake "db:migrate" If you want to list tasks

No notification when guard-rspec is used with spork

怎甘沉沦 提交于 2019-12-06 04:06:21
问题 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 回答1: I know it is

Rails: Cucumber not cleaning DB

為{幸葍}努か 提交于 2019-12-05 08:32:54
I'm having some issues with cucumber & database transactions - specifically, when I run the test suite, database transactions are not cleaned afterwards. I'm running rails 3.1 with spork, postgres. Initially features/support/env.rb was set to use database_cleaner, but consistently got the following error on each call to the db: No database specified. Missing argument: database. (ArgumentError) /Users/john/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0.rc4/lib/active_record/connection_adapters/postgresql_adapter.rb:22:in postgresql_connection' /Users/john/.rvm/gems/ruby-1.9.2-p290/gems

Rspec extremely slow

依然范特西╮ 提交于 2019-12-05 02:23:25
问题 My rspec tests seem to run extremely slow even with guard & spork. Finished in 5.36 seconds 13 examples, 2 failures I understand that there are several things I can do to optimize my tests & reduce interaction with the database, but I strongly suspect that the spec_helper has been improperly setup. I'm on rails 3.2.11 with mongoid. Database cleaner cleans up after every run. spec_helper.rb require 'rubygems' require 'spork' Spork.prefork do ENV["RAILS_ENV"] ||= 'test' require File.expand_path