我是使用RSpec的新手。当我运行rake规范时,我得到一个巨大的垃圾邮件输出,而不是任何传递和失败的简短摘要。我试图在测试env config.log_level = :info
中更改日志级别,但我仍然得到疯狂的输出。我做错了什么?
输出示例:
c:\etc\Software\zawa>rake spec
NOTICE: CREATE TABLE will create implicit sequence "ecard_challenges_id_seq" fo
r serial column "ecard_challenges.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ecard_challenges
_pkey" for table "ecard_challenges"
NOTICE: CREATE TABLE will create implicit sequence "ecard_matches_id_seq" for s
erial column "ecard_matches.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ecard_matches_pk
ey" for table "ecard_matches"
NOTICE: CREATE TABLE will create implicit sequence "players_id_seq" for serial
column "players.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "players_pkey" fo
r table "players"
C:/Ruby193/bin/ruby.exe -S rspec ./spec/controllers/ecard_challenges_controller_
spec.rb ./spec/controllers/ecard_matches_controller_spec.rb ./spec/controllers/p
layers_controller_spec.rb ./spec/helpers/ecard_challenges_helper_spec.rb ./spec/
helpers/ecard_matches_helper_spec.rb ./spec/helpers/players_helper_spec.rb ./spe
c/models/ecard_challenge_spec.rb ./spec/models/ecard_match_spec.rb ./spec/models
/player_spec.rb ./spec/requests/ecard_challenges_spec.rb ./spec/requests/ecard_m
atches_spec.rb ./spec/requests/players_spec.rb ./spec/routing/ecard_challenges_r
outing_spec.rb ./spec/routing/ecard_matches_routing_spec.rb ./spec/routing/playe
rs_routing_spec.rb ./spec/views/ecard_challenges/edit.html.erb_spec.rb ./spec/vi
ews/ecard_challenges/index.html.erb_spec.rb ./spec/views/ecard_challenges/new.ht
ml.erb_spec.rb ./spec/views/ecard_challenges/show.html.erb_spec.rb ./spec/views/
ecard_matches/edit.html.erb_spec.rb ./spec/views/ecard_matches/index.html.erb_sp
ec.rb ./spec/views/ecard_matches/new.html.erb_spec.rb ./spec/views/ecard_matches
/show.html.erb_spec.rb ./spec/views/players/edit.html.erb_spec.rb ./spec/views/p
layers/index.html.erb_spec.rb ./spec/views/players/new.html.erb_spec.rb ./spec/v
iews/players/show.html.erb_spec.rb
Processing by EcardChallengesController#index as HTML
Rendered ecard_challenges/index.html.erb within layouts/application (18.0ms)
Completed 200 OK in 107ms (Views: 94.0ms | ActiveRecord: 1.0ms)
[32m.[0m Processing by EcardChallengesController#show as HTML
Parameters: {"id"=>"2"}
Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.0ms)
[31mF[0m Processing by EcardChallengesController#new as HTML
Completed 500 Internal Server Error in 4ms
[31mF[0m Processing by EcardChallengesController#edit as HTML
Parameters: {"id"=>"3"}
Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.0ms)
[32m.[0m Processing by EcardChallengesController#create as HTML
Parameters: {"ecard_challenge"=>{"players"=>["474473722", "325967219"]}}
Completed 500 Internal Server Error in 1ms
[31mF[0m Processing by EcardChallengesController#create as HTML
Parameters: {"ecard_challenge"=>{"players"=>["474473722", "325967219"]}}
Completed 500 Internal Server Error in 1ms
[31mF[0m Processing by EcardChallengesController#create as HTML
Parameters: {"ecard_challenge"=>{"players"=>["474473722", "325967219"]}}
Completed 500 Internal Server Error in 1ms
[31mF[0m Processing by EcardChallengesController#create as HTML
Parameters: {"ecard_challenge"=>{}}
Completed 500 Internal Server Error in 5ms
[31mF[0m Processing by EcardChallengesController#create as HTML
Parameters: {"ecard_challenge"=>{}}
Completed 500 Internal Server Error in 3ms
[31mF[0m Processing by EcardChallengesController#update as HTML
Parameters: {"ecard_challenge"=>{"these"=>"params"}, "id"=>"4"}
Completed 200 OK in 3ms (Views: 0.0ms | ActiveRecord: 1.0ms)
[32m.[0m Processing by EcardChallengesController#update as HTML
Parameters: {"ecard_challenge"=>{"players"=>["474473722", "325967219"]}, "id"=
>"5"}
Completed 500 Internal Server Error in 2ms
[31mF[0m Processing by EcardChallengesController#update as HTML
Parameters: {"ecard_challenge"=>{"players"=>["474473722", "325967219"]}, "id"=
>"6"}
Completed 500 Internal Server Error in 2ms
[31mF[0m Processing by EcardChallengesController#update as HTML
Parameters: {"ecard_challenge"=>{}, "id"=>"7"}
Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 1.0ms)
[32m.[0m Processing by EcardChallengesController#update as HTML
Parameters: {"ecard_challenge"=>{}, "id"=>"8"}
Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 1.0ms)
[32m.[0m[31mF[0m[31mF[0m Processing by EcardMatchesController#index as HT
ML
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#show as HTML
Parameters: {"id"=>"2"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#new as HTML
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#edit as HTML
Parameters: {"id"=>"3"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#create as HTML
Parameters: {"ecard_match"=>{}}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#create as HTML
Parameters: {"ecard_match"=>{}}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#create as HTML
Parameters: {"ecard_match"=>{}}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#create as HTML
Parameters: {"ecard_match"=>{}}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#create as HTML
Parameters: {"ecard_match"=>{}}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#update as HTML
Parameters: {"ecard_match"=>{"these"=>"params"}, "id"=>"4"}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#update as HTML
Parameters: {"ecard_match"=>{}, "id"=>"5"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#update as HTML
Parameters: {"ecard_match"=>{}, "id"=>"6"}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#update as HTML
Parameters: {"ecard_match"=>{}, "id"=>"7"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#update as HTML
Parameters: {"ecard_match"=>{}, "id"=>"8"}
Redirected to http://test.host/login
Completed 302 Found in 1ms
[31mF[0m Processing by EcardMatchesController#destroy as HTML
Parameters: {"id"=>"9"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by EcardMatchesController#destroy as HTML
Parameters: {"id"=>"10"}
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by PlayersController#index as HTML
Redirected to http://test.host/login
Completed 302 Found in 2ms
[31mF[0m Processing by PlayersController#show as HTML
Parameters: {"id"=>"474473724"}
Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.0ms)
[32m.[0m Processing by PlayersController#new as HTML
Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
[32m.[0m Processing by PlayersController#create as HTML
Parameters: {"player"=>{"name"=>"Snir", "password"=>"[FILTERED]"}}
Redirected to http://test.host/players/474473725
Completed 302 Found in 4ms
[32m.[0m Processing by PlayersController#create as HTML
Parameters: {"player"=>{"name"=>"Snir", "password"=>"[FILTERED]"}}
Redirected to http://test.host/players/474473726
Completed 302 Found in 4ms
[32m.[0m Processing by PlayersController#create as HTML
Parameters: {"player"=>{"name"=>"Snir", "password"=>"[FILTERED]"}}
Redirected to http://test.host/players/474473727
Completed 302 Found in 25ms
[31mF[0m Processing by PlayersController#create as HTML
Parameters: {"player"=>{}}
Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
[32m.[0m Processing by PlayersController#create as HTML
Parameters: {"player"=>{}}
Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
[32m.[0m[33m*[0m[33m*[0m[33m*[0m[32m.[0m[32m.[0m[32m.[0m
Started GET "/ecard_challenges" for 127.0.0.1 at 2012-03-31 17:45:22 +0300
Processing by EcardChallengesController#index as HTML
Redirected to http://www.example.com/login
Completed 302 Found in 2ms
[31mF[0m
Started GET "/ecard_matches" for 127.0.0.1 at 2012-03-31 17:45:22 +0300
Processing by EcardMatchesController#index as HTML
Redirected to http://www.example.com/login
Completed 302 Found in 2ms
[31mF[0m
Started GET "/players" for 127.0.0.1 at 2012-03-31 17:45:22 +0300
Processing by PlayersController#index as HTML
Redirected to http://www.example.com/login
Completed 302 Found in 2ms
[31mF[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m
[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m
[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0mRendered ecard_chall
enges/_form.html.erb (52.0ms)
[31mF[0m[32m.[0mRendered ecard_challenges/_form.html.erb (3.0ms)
[31mF[0m[32m.[0mRendered ecard_matches/_form.html.erb (3.0ms)
[32m.[0m[32m.[0mRendered ecard_matches/_form.html.erb (3.0ms)
[32m.[0m[32m.[0mRendered players/_form.html.erb (2.0ms)
[32m.[0m[32m.[0mRendered players/_form.html.erb (1.0ms)
[32m.[0m[32m.[0m
Pending:
[33m EcardChallengesHelper add some examples to (or delete) c:/etc/Software/za
wa/spec/helpers/ecard_challenges_helper_spec.rb[0m
[36m # No reason given[0m
[36m # ./spec/helpers/ecard_challenges_helper_spec.rb:14[0m
[33m EcardMatchesHelper add some examples to (or delete) c:/etc/Software/zawa/
spec/helpers/ecard_matches_helper_spec.rb[0m
[36m # No reason given[0m
[36m # ./spec/helpers/ecard_matches_helper_spec.rb:14[0m
[33m PlayersHelper add some examples to (or delete) c:/etc/Software/zawa/spec/
helpers/players_helper_spec.rb[0m
[36m # No reason given[0m
[36m # ./spec/helpers/players_helper_spec.rb:14[0m
Failures:
1) EcardChallengesController GET show assigns the requested ecard_challenge as
@ecard_challenge
[31mFailure/Error:[0m [31massigns(:ecard_challenge).should eq(ecard_chal
lenge)[0m
[31m[0m
[31mexpected: #<EcardChallenge id: 2, wager: nil, is_active: nil, is_acc
epted: nil, ecard_match_id: nil, created_at: "2012-03-31 14:45:22", updated_at:
"2012-03-31 14:45:22">[0m
[31m got: nil[0m
[31m[0m
[31m(compared using ==)[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:53:in `block
(3 levels) in <top (required)>'[0m
2) EcardChallengesController GET new assigns a new ecard_challenge as @ecard_c
hallenge
[31mFailure/Error:[0m [31mget :new, {}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got NilClass(#16485528)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:20:in `new'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:59:in `block
(3 levels) in <top (required)>'[0m
3) EcardChallengesController POST create with valid params creates a new Ecard
Challenge
[31mFailure/Error:[0m [31mpost :create, {:ecard_challenge => valid_attri
butes}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got String(#16483836)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `new'[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `create'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:76:in `block
(5 levels) in <top (required)>'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:75:in `block
(4 levels) in <top (required)>'[0m
4) EcardChallengesController POST create with valid params assigns a newly cre
ated ecard_challenge as @ecard_challenge
[31mFailure/Error:[0m [31mpost :create, {:ecard_challenge => valid_attri
butes}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got String(#16483836)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `new'[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `create'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:81:in `block
(4 levels) in <top (required)>'[0m
5) EcardChallengesController POST create with valid params redirects to the cr
eated ecard_challenge
[31mFailure/Error:[0m [31mpost :create, {:ecard_challenge => valid_attri
butes}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got String(#16483836)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `new'[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:36:in `create'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:87:in `block
(4 levels) in <top (required)>'[0m
6) EcardChallengesController POST create with invalid params assigns a newly c
reated but unsaved ecard_challenge as @ecard_challenge
[31mFailure/Error:[0m [31mpost :create, {:ecard_challenge => {}}, valid_
session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got NilClass(#16485528)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:41:in `create'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:96:in `block
(4 levels) in <top (required)>'[0m
7) EcardChallengesController POST create with invalid params re-renders the 'n
ew' template
[31mFailure/Error:[0m [31mpost :create, {:ecard_challenge => {}}, valid_
session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got NilClass(#16485528)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:41:in `create'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:103:in `block
(4 levels) in <top (required)>'[0m
8) EcardChallengesController PUT update with valid params assigns the requeste
d ecard_challenge as @ecard_challenge
[31mFailure/Error:[0m [31mput :update, {:id => ecard_challenge.to_param,
:ecard_challenge => valid_attributes}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got String(#16483836)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:60:in `block in upd
ate'[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:59:in `update'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:123:in `block
(4 levels) in <top (required)>'[0m
9) EcardChallengesController PUT update with valid params redirects to the eca
rd_challenge
[31mFailure/Error:[0m [31mput :update, {:id => ecard_challenge.to_param,
:ecard_challenge => valid_attributes}, valid_session[0m
[31mActiveRecord::AssociationTypeMismatch:[0m
[31mPlayer(#34520916) expected, got String(#16483836)[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:60:in `block in upd
ate'[0m
[36m # ./app/controllers/ecard_challenges_controller.rb:59:in `update'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:129:in `block
(4 levels) in <top (required)>'[0m
10) EcardChallengesController DELETE destroy destroys the requested ecard_chal
lenge
[31mFailure/Error:[0m [31mdelete :destroy, {:id => ecard_challenge.to_pa
ram}, valid_session[0m
[31mAbstractController::ActionNotFound:[0m
[31mThe action 'destroy' could not be found for EcardChallengesControlle
r[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:157:in `block
(4 levels) in <top (required)>'[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:156:in `block
(3 levels) in <top (required)>'[0m
11) EcardChallengesController DELETE destroy redirects to the ecard_challenges
list
[31mFailure/Error:[0m [31mdelete :destroy, {:id => ecard_challenge.to_pa
ram}, valid_session[0m
[31mAbstractController::ActionNotFound:[0m
[31mThe action 'destroy' could not be found for EcardChallengesControlle
r[0m
[36m # ./spec/controllers/ecard_challenges_controller_spec.rb:163:in `block
(3 levels) in <top (required)>'[0m
12) EcardMatchesController GET index assigns all ecard_matches as @ecard_match
es
[31mFailure/Error:[0m [31massigns(:ecard_matches).should eq([ecard_match
])[0m
[31m[0m
[31mexpected: [#<EcardMatch id: 1, first_player_id: nil, second_player_i
d: nil, wager: nil, round: nil, turn: nil, first_score: nil, second_score: nil,
created_at: "2012-03-31 14:45:22", updated_at: "2012-03-31 14:45:22">][0m
[31m got: nil[0m
[31m[0m
[31m(compared using ==)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:41:in `block (3
levels) in <top (required)>'[0m
13) EcardMatchesController GET show assigns the requested ecard_match as @ecar
d_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should eq(ecard_match)[
0m
[31m[0m
[31mexpected: #<EcardMatch id: 2, first_player_id: nil, second_player_id
: nil, wager: nil, round: nil, turn: nil, first_score: nil, second_score: nil, c
reated_at: "2012-03-31 14:45:22", updated_at: "2012-03-31 14:45:22">[0m
[31m got: nil[0m
[31m[0m
[31m(compared using ==)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:49:in `block (3
levels) in <top (required)>'[0m
14) EcardMatchesController GET new assigns a new ecard_match as @ecard_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should be_a_new(EcardMat
ch)[0m
[31mexpected nil to be a new EcardMatch(id: integer, first_player_id: in
teger, second_player_id: integer, wager: integer, round: integer, turn: integer,
first_score: integer, second_score: integer, created_at: datetime, updated_at:
datetime)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:56:in `block (3
levels) in <top (required)>'[0m
15) EcardMatchesController GET edit assigns the requested ecard_match as @ecar
d_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should eq(ecard_match)[
0m
[31m[0m
[31mexpected: #<EcardMatch id: 3, first_player_id: nil, second_player_id
: nil, wager: nil, round: nil, turn: nil, first_score: nil, second_score: nil, c
reated_at: "2012-03-31 14:45:22", updated_at: "2012-03-31 14:45:22">[0m
[31m got: nil[0m
[31m[0m
[31m(compared using ==)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:64:in `block (3
levels) in <top (required)>'[0m
16) EcardMatchesController POST create with valid params creates a new EcardMa
tch
[31mFailure/Error:[0m [31mexpect {[0m
[31mcount should have been changed by 1, but was changed by 0[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:71:in `block (4
levels) in <top (required)>'[0m
17) EcardMatchesController POST create with valid params assigns a newly creat
ed ecard_match as @ecard_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should be_a(EcardMatch)
[0m
[31mexpected nil to be a kind of EcardMatch(id: integer, first_player_id
: integer, second_player_id: integer, wager: integer, round: integer, turn: inte
ger, first_score: integer, second_score: integer, created_at: datetime, updated_
at: datetime)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:78:in `block (4
levels) in <top (required)>'[0m
18) EcardMatchesController POST create with valid params redirects to the crea
ted ecard_match
[31mFailure/Error:[0m [31mresponse.should redirect_to(EcardMatch.last)[
0m
[31mExpected response to be a redirect to <http://test.host/ecard_matche
s> but was a redirect to <http://test.host/login>[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:84:in `block (4
levels) in <top (required)>'[0m
19) EcardMatchesController POST create with invalid params assigns a newly cre
ated but unsaved ecard_match as @ecard_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should be_a_new(EcardMat
ch)[0m
[31mexpected nil to be a new EcardMatch(id: integer, first_player_id: in
teger, second_player_id: integer, wager: integer, round: integer, turn: integer,
first_score: integer, second_score: integer, created_at: datetime, updated_at:
datetime)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:93:in `block (4
levels) in <top (required)>'[0m
20) EcardMatchesController POST create with invalid params re-renders the 'new
' template
[31mFailure/Error:[0m [31mresponse.should render_template("new")[0m
[31mexpecting <"new"> but rendering with <"">[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:100:in `block (4
levels) in <top (required)>'[0m
21) EcardMatchesController PUT update with valid params updates the requested
ecard_match
[31mFailure/Error:[0m [31mUnable to find matching line from backtrace[0
m
[31mExactly one instance should have received the following message(s) b
ut didn't: update_attributes[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s/any_instance/recorder.rb:80:in `verify'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s/any_instance.rb:32:in `rspec_verify'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s/space.rb:11:in `block in verify_all'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s/space.rb:10:in `each'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s/space.rb:10:in `verify_all'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mock
s.rb:19:in `verify'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
mocking/with_rspec.rb:14:in `verify_mocks_for_rspec'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example.rb:222:in `run_after_each'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example.rb:86:in `block in run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example.rb:173:in `with_around_hooks'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example.rb:77:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:355:in `block in run_examples'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:351:in `map'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:351:in `run_examples'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:337:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `block in run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `map'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `block in run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `map'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
example_group.rb:338:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
command_line.rb:28:in `block (2 levels) in run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
command_line.rb:28:in `map'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
command_line.rb:28:in `block in run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
reporter.rb:34:in `report'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
command_line.rb:25:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
runner.rb:80:in `run_in_process'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
runner.rb:69:in `run'[0m
[36m # C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.8.0/lib/rspec/core/
runner.rb:10:in `block in autorun'[0m
22) EcardMatchesController PUT update with valid params assigns the requested
ecard_match as @ecard_match
[31mFailure/Error:[0m [31massigns(:ecard_match).should eq(ecard_match)[
0m
[31m[0m
[31mexpected: #<EcardMatch id: 5, first_player_id: nil, second_player_id
: nil, wager: nil, round: nil, turn: nil, first_score: nil, second_score: nil, c
reated_at: "2012-03-31 14:45:22", updated_at: "2012-03-31 14:45:22">[0m
[31m got: nil[0m
[31m[0m
[31m(compared using ==)[0m
[36m # ./spec/controllers/ecard_matches_controller_spec.rb:120:in `block (4
levels) in <top (required)>'[0m
23) EcardMatchesController PUT update with valid params redirects to the ecard
_match.......
答案 0 :(得分:1)
我有同样的问题,RSpec显示奇怪的字符,如
←[31mF←[0米←[32米。←[0米←[31mF←[0米←[31mF←[0米←[31mF←[0米←[32米。←[0米 ←[31mFailure /错误:←[0m←[31mvisit'/ static_pages / about'←[0m
原来,它试图用颜色打印输出(只在Window cmd上出现此问题)。我能够使用这个wac程序摆脱这些角色。下载并将其放入您的路径,然后您就可以运行
bundle exec rspec spec / requests / static_pages_spec.rb | WAC
它仍然没有给我颜色。但至少我有干净的输出继续前进。
答案 1 :(得分:0)
试试这个:
rspec spec --format documentation