[rspec-users] Possible Problem with RSpec and
James B. Byrne
byrnejb at harte-lyne.ca
Sat Nov 24 19:48:13 EST 2007
Sorry to be such a pest but I am trying to learn Ruby, Rails and RSpec all
at one go and it is a bit overwhelming. I have previously completed the
depot tutorial in the Agile Web Dev with rails book and now I am trying do
do it again using RSpec.
What I would like to know now is why I am getting a rake failure error at
the end of every spec:models run. Is this the expected behaviour when a
test / expectation fails?
--->
C:\var\RSpec\depot>rake spec:models
(in C:/var/RSpec/depot)
NOTICE: CREATE TABLE will create implicit sequence "products_id_seq" for
serial
column "products.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"products_pkey" f
or table "products"
Product
- should have a valid image uri (PENDING: Not Yet Implemented)
- should have a description
- should have a title (FAILED - 1)
Pending:
Product should have a valid image uri (Not Yet Implemented)
1)
'Product should have a title' FAILED
expected valid? to return true, got false
./spec/models/product_spec.rb:11:
Finished in 0.75 seconds
3 examples, 1 failure, 1 pending
rake aborted!
Command ruby -I
"C:/var/RSpec/depot/vendor/plugins/rspec/lib"
"C:/var/RSpec/depot/vendor/plugins/rspec/bin/spec"
"spec/models/product_spec.rb"
--options
"C:/var/RSpec/depot/config/../spec/spec.opts" failed
(See full trace by running task with --trace)
C:\var\RSpec\depot>rake spec:models --trace
(in C:/var/RSpec/depot)
** Invoke spec:models (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:clone
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
NOTICE: CREATE TABLE will create implicit sequence "products_id_seq" for
serial column "products.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"products_pkey" for table "products"
** Execute spec:models
Product
- should have a valid image uri (PENDING: Not Yet Implemented)
- should have a description
- should have a title (FAILED - 1)
Pending:
Product should have a valid image uri (Not Yet Implemented)
1)
'Product should have a title' FAILED
expected valid? to return true, got false
./spec/models/product_spec.rb:11:
Finished in 0.563 seconds
3 examples, 1 failure, 1 pending
rake aborted!
Command ruby -I"C:/var/RSpec/depot/vendor/plugins/rspec/lib"
"C:/var/RSpec/depot/vendor/plugins/rspec/bin/spec" "spec/models/
product_spec.rb" --options "C:/var/RSpec/depot/config/../spec/spec.opts"
failed
C:/var/RSpec/depot/vendor/plugins/rspec/lib/spec/rake/
spectask.rb:173:in `define'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:823:in `verbose'
C:/var/RSpec/depot/vendor/plugins/rspec/lib/spec/rake/
spectask.rb:142:in `define'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:392:in `call'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:392:in `execute'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:392:in `each'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:392:in `execute'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:362:in `invoke'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:355:in `synchronize'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:355:in `invoke'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1739:in `top_level'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1739:in `each'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1739:in `top_level'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1761:in `standard_exception_handling'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1733:in `top_level'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1711:in `run'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1761:in `standard_exception_handling'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/
rake.rb:1708:in `run'
C:/usr/local/bin/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
C:/usr/local/bin/ruby/bin/rake.bat:20:in `load'
C:/usr/local/bin/ruby/bin/rake.bat:20
C:\var\RSpec\depot>
<---
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the rspec-users
mailing list