How do you run a single test/spec file in RSpec?

I want to be able to run a single spec file's tests — for the one file I'm editing, for example. rake spec executes all the specs. My project is not a Rails project, so rake spec:doc doesn't work. Don't know if this matters, but here is my directory structure. ./Rakefile ./lib ./lib/cushion.rb ./lib/cushion ./lib/cushion/doc.rb ./lib/cushion/db.rb ./spec ./spec/spec.opts ./s

你如何在RSpec中运行单个测试/ spec文件?

例如,我希望能够运行单个spec文件的测试 - 对于我正在编辑的一个文件。 rake spec执行所有规格。 我的项目不是Rails项目,所以rake spec:doc不起作用。 不知道这是否重要,但这里是我的目录结构。 ./Rakefile ./lib ./lib/cushion.rb ./lib/cushion ./lib/cushion/doc.rb ./lib/cushion/db.rb ./spec ./spec/spec.opts ./spec/spec_helper.rb ./spec/db_spec.rb 或者你可以跳过耙子并使用'rspec'命令: rspec pa

can I use multiple exclusion filters in rspec?

In a _spec.rb file I'm setting up an exclusion filter something like: RSpec.configure do |config| # we need determine this once at the very front # and the result be available in the instance server_success = server1_available? config.exclusion_filter = { :svr1 => lambda {|what| case what when :available !server_success end } } end and then la

我可以在rspec中使用多个排除过滤器吗?

在_spec.rb文件中,我设置了一个排除过滤器,如下所示: RSpec.configure do |config| # we need determine this once at the very front # and the result be available in the instance server_success = server1_available? config.exclusion_filter = { :svr1 => lambda {|what| case what when :available !server_success end } } end 然后在我的文件中 describe :get_

Having problems installing ruby 1.9.3

I installed ruby 1.9.3 by the command rvm install 1.9.3 on mac's terminal. I got these errors (see below) after I installation. Does anybody have any ideas to solve this? Error running './configure --prefix=/Users/Keta/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --dis

安装ruby 1.9.3时遇到问题

我在Mac的终端上通过命令rvm install 1.9.3安装了ruby 1.9.3。 安装后出现这些错误(请参阅下文)。 有没有人有任何想法来解决这个问题? 错误运行'./configure --prefix = / Users / Keta / .rvm / rubies / ruby​​-1.9.3-p551 --with-opt-dir = / usr / local / opt / libyaml:/ usr / local / opt / readline:/ usr / local / opt / libksba:/ usr / local / opt / openssl --without-tcl --without-tk --disable-

configuration error in RVM

I am trying to download ruby 1.9.3 (for learning purposes, this is the version in the book) When I run $rvm install 1.9.3 I get a configuration error: Error running './configure --prefix=/Users/john/.rvm/rubies/ruby-1.9.3-p545 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --witho

RVM中的配置错误

我试图下载红宝石1.9.3(用于学习的目的,这是本书中的版本)当我运行$rvm install 1.9.3出现配置错误: 运行'./configure --prefix = / Users / john / .rvm / rubies / ruby​​-1.9.3-p545 --with-opt-dir = / usr / local / Cellar / libyaml / 0.1.6时出错:/ usr /local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --without-tk --disable- install-doc

Installing Ruby 2.0.0 using RVM with errors in configure

I am currently running on Ruby 1.9.3p134 and trying to install Ruby 2.0.0 using RVM, however I keep running into the errors below. I am running on OSX 10.7.5: Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --prefix=/usr/local/rvm/rubies/ruby-2.0.0-p195 --with-opt-dir=/opt/sm/pkg/active --disable-install-d

在配置中使用RVM安装Ruby 2.0.0时出错

我目前正在Ruby 1.9.3p134上运行,并尝试使用RVM安装Ruby 2.0.0,但是我仍然遇到以下错误。 我在OSX 10.7.5上运行: 错误运行'env LDFLAGS = -L / opt / sm / pkg / active / lib CFLAGS = -I / opt / sm / pkg / active / include CPATH = / opt / sm / pkg / active / include ./configure --prefix = / usr / local / rvm / rubies / ruby​​-2.0.0-p195 --with-opt-dir = / opt / sm / pkg / active --disable -instal

Error while running configure during RVM install 1.9.3

While running 'rvm install 1.9.3' I get the following error: Error running ' ./configure --prefix=/Users/jordan/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/jordan/.rvm/usr ', please read /Users/jordan/.rvm/log/ruby-1.9.3-p194/configure.log There has been an error while running configure. Halting the installation. This

在RVM安装1.9.3期间运行配置时出错

在运行'rvm install 1.9.3'时出现以下错误: 运行'./configure --prefix = / Users / jordan / .rvm / rubies / ruby​​-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt- dir = / Users / jordan / .rvm / usr',请阅读/Users/jordan/.rvm/log/ruby-1.9.3-p194/configure.log运行configure时出错。 停止安装。 这是configure.log的输出: [2012-05-07 19:07:43] ./configure

zlib even after using rvm pkg install zlib

I installed zlib package and ruby 1.9.3 using rvm, but whenever I try to install gems it says cannot load such file -- zlib The commands I used to install are $ rvm install 1.9.3 $ rvm pkg install zlib $ rvm reinstall 1.9.3 --with-readline-dir=/home/username/.rvm/usr --with-iconv-dir=/home/username/.rvm/usr --with-zlib-dir=/home/username/.rvm/usr --with-openssl-dir=/home/usern

甚至在使用rvm pkg install zlib之后

我使用rvm安装了zlib软件包和ruby 1.9.3,但是每当我尝试安装gems时,它都说cannot load such file -- zlib 我用来安装的命令是 $ rvm install 1.9.3 $ rvm pkg install zlib $ rvm reinstall 1.9.3 --with-readline-dir=/home/username/.rvm/usr --with-iconv-dir=/home/username/.rvm/usr --with-zlib-dir=/home/username/.rvm/usr --with-openssl-dir=/home/username/.rvm/usr $ rvm use 1.9.3 $ gem in

C Compiler error with Lion and Newly Installed/Updated XCode

I am trying to set up RVM with Ruby 1.9.3-p0 and when I run $rvm install 1.9.3 I get: ERROR: Error running ' ./configure --prefix=/Users/zkidd/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/zkidd/.rvm/usr ', please read /Users/zkidd/.rvm/log/ruby-1.9.3-p0/configure.log ERROR: There has been an error while running configure. Halting the insta

C编译器错误与狮子和新安装/更新的XCode

我正在尝试使用Ruby 1.9.3-p0设置RVM,并在运行时运行 $rvm install 1.9.3 我得到: 错误:运行'./configure --prefix = / Users / zkidd / .rvm / rubies / ruby​​-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir = /用户/ zkidd / .rvm / usr',请阅读/Users/zkidd/.rvm/log/ruby-1.9.3-p0/configure.log错误:运行configure时出错。 停止安装。 然后当我打开textmate中的configure.log时

Issue installing Ruby by rvm (error while running configure)

这是我的,有没有人有一个想法,使其正确配置? MacBook-Air-de-Remy-Thellier:~ remythellier$ rvm install 1.9.2 /Users/remythellier/.rvm/rubies/ruby-1.9.2-p0, this may take a while depending on your cpu(s)... ruby-1.9.2-p0 - #fetching ruby-1.9.2-p0 - #extracted to /Users/remythellier/.rvm/src/ruby-1.9.2-p0 (already extracted) ruby-1.9.2-p0 - #configuring Error running './configure --prefix=/Users/

通过rvm安装Ruby的问题(​​运行configure时出错)

这是我的,有没有人有一个想法,使其正确配置? MacBook-Air-de-Remy-Thellier:~ remythellier$ rvm install 1.9.2 /Users/remythellier/.rvm/rubies/ruby-1.9.2-p0, this may take a while depending on your cpu(s)... ruby-1.9.2-p0 - #fetching ruby-1.9.2-p0 - #extracted to /Users/remythellier/.rvm/src/ruby-1.9.2-p0 (already extracted) ruby-1.9.2-p0 - #configuring Error running './configure --prefix=/Users/

WEBrick errors on ruby 1.8, works fine on ruby 1.9

I have the following script which runs a web server and executes a command when a request is received. #!/usr/bin/env ruby require 'webrick' server = WEBrick::HTTPServer.new(port: ARGV.first) server.mount_proc '/' do |req, res| r10kstatus = system( "sudo r10k deploy environment -pv warn" ) puts r10kstatus end trap 'INT' do server.shutdown end server.start Unfortunatly, I need to backport

Ruby ruby​​ 1.8上的WEBrick错误,在Ruby 1.9上正常工作

我有以下脚本运行Web服务器并在收到请求时执行命令。 #!/usr/bin/env ruby require 'webrick' server = WEBrick::HTTPServer.new(port: ARGV.first) server.mount_proc '/' do |req, res| r10kstatus = system( "sudo r10k deploy environment -pv warn" ) puts r10kstatus end trap 'INT' do server.shutdown end server.start 不幸的是,我需要将它支持到ruby 1.8上(因为在分布式系统上运行脚本的rvm是一种痛苦)。