Got 7 failed tests when I ran "rake" - is that expected?

30 views
Skip to first unread message

Al

unread,
Sep 12, 2012, 2:22:32 PM9/12/12
to ror_ec...@googlegroups.com
Ran "rake" and got 7 failed tests.
I fixed 4 of them by adding code to spec_helper.rb file but
still have 3 tests failing in spec/models/deal_spec.rb file.

Thanks,
Al Snow

David Henner

unread,
Sep 12, 2012, 3:18:54 PM9/12/12
to ror_ec...@googlegroups.com
Hmmm


Let me look.  They were passing the last time I checked.  I'm not the only person committing code these days though.

BTW:  I have never ran "rake"

I use autotest, I wonder if that could be an issue

Dave

David Henner

unread,
Sep 12, 2012, 3:26:43 PM9/12/12
to ror_ec...@googlegroups.com
I'll run "rake" later (after work) but autotest was giving me all passing tests.

Dave

Al

unread,
Sep 13, 2012, 10:32:19 AM9/13/12
to ror_ec...@googlegroups.com
Tried "autotest" and got same results:

Failures:

 

  1) Deal Deal.best_qualifing_deal(order) should return 10.0"

     Failure/Error: Deal.best_qualifing_deal(@order).should == 10.0 # $20.00 * 0.50

       expected: 10.0

            got: 0.0 (using ==)

     # ./spec/models/deal_spec.rb:28:in `block (3 levels) in <top (required)>'

 

  2) Deal Deal.best_qualifing_deal(order) should return 11.50"

     Failure/Error: Deal.best_qualifing_deal(@order).should == 11.5 # $23.00 * 0.50

       expected: 11.5

            got: 0.0 (using ==)

     # ./spec/models/deal_spec.rb:34:in `block (3 levels) in <top (required)>'

 

  3) Deal Deal.best_qualifing_deal(order) should return 10.0"

     Failure/Error: Deal.best_qualifing_deal(@order).should == 1.00 # $20.00 * 0.50

       expected: 1.0

            got: 0.0 (using ==)

     # ./spec/models/deal_spec.rb:107:in `block (3 levels) in <top (required)>'

 

Finished in 141.29 seconds

766 examples, 3 failures, 16 pending


==============================================================

David Henner

unread,
Sep 13, 2012, 11:06:30 AM9/13/12
to ror_ec...@googlegroups.com
Can you give me the full error stack?  

Are you using sqlite or mysql or postgres?  I am using mySQL.

Al Snow

unread,
Sep 13, 2012, 1:20:40 PM9/13/12
to ror_ec...@googlegroups.com, jas...@gmail.com
David,

>>> Can you give me the full error stack?  

Here is all of the output from the "rake" command: https://gist.github.com/3715876
I am using a early-2009 Macbook with Lion.


>>> Are you using sqlite or mysql or postgres?  I am using mySQL.

sqlite3

Thanks,
Al Snow


Date: Thu, 13 Sep 2012 08:06:30 -0700
Subject: Re: Got 7 failed tests when I ran "rake" - is that expected?
From: drhe...@gmail.com
To: ror_ec...@googlegroups.com

David Henner

unread,
Sep 13, 2012, 2:02:28 PM9/13/12
to ror_ec...@googlegroups.com, jas...@gmail.com
I'll take a look with SQLite.  I'm guessing this is a SQLite difference.  

Thanks for the info.

Denis Peplin

unread,
Sep 14, 2012, 1:41:33 AM9/14/12
to ror_ec...@googlegroups.com, jas...@gmail.com
Rails 4 uses PostgreSQL by default. Besides other advantages, it has
full-text search engine embedded and Hstore. Some Rails projects moved
to Postgresql and dropped other databases compatibility.

2012/9/13 David Henner <drhe...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages