我下面的红宝石在轨道上教程: http://railstutorial.org/chapters/static-pages#top

我到使用最高反射率.具有安装的win32console宝石,它输出的胡言乱语的控制台上,我假设它是输出ansi颜色的改变规范:

>rspec spec/
?[31mF?[0m?[31mF?[0m

Finished in 0.34376 seconds
?[31m2 examples, 2 failures?[0m

1) PagesController GET 'home' should be successful
    Failure/Error: Unable to find C to read failed line
    ?[31mundefined method `get' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x22294e0>?[0m
?[90m    # ./spec/controllers/pages_controller_spec.rb:7:in `block (3 levels) in <top (required)>'?[0m

2) PagesController GET 'contact' should be successful
    Failure/Error: Unable to find C to read failed line
    ?[31mundefined method `get' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_2:0x2173d28>?[0m
?[90m    # ./spec/controllers/pages_controller_spec.rb:14:in `block (3 levels) in <top (required)>'?[0m

任何提示如何解决这个问题?

有帮助吗?

解决方案

Ansicon工作!

http://adoxa.110mb.com/ansicon/index.html

下载,将其提取到某个地方,然后做:

ansicon -i

然后关闭/重新打开命令提示符。甜的!

其他提示

RSPEC 2的Beta版本中有一个错误。如果您已安装Win32Console,则现在应该看到颜色。

看到这个: http://github.com/rspec/rspec-core/issuesearch?state=closed&q=color#issue/143

更新:请注意此线程:

http://groups.google.com/group/rubyinstaller/browse_thread/thread/thread/2d2a62db7281509a/?pli=1

更新:

最高反射率仍然非常车带窗着色,尤其是如果你试图使用它以自动测试和/或Spork.

如果你们仍然看到逃跑码,快速破解的是编辑的下列文件(确切路径将取决于您的最高反射率)

%RUBY_HOME%\lib\红宝石\宝\1.9.1\宝\最高反射率-core-2.0.1\bin\最高反射率

并添加下面一行

require 'win32console'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top