[Nitro] Og tests helper

Mark Van De Vyver mvyver at gmail.com
Tue Sep 11 05:15:18 EDT 2007


On 9/11/07, Arne Brasseur <arne at arnebrasseur.net> wrote:
>
>  Mark Van De Vyver schreef:
>  I'm not sure if it's the same cause but I see the red '0 failed'
> results if I use the following in the test helper:
>
> OG_ADAPTER = :dbi_sqlite
> OG_ADAPTER = :sqlite
>
>  You're reassigning a constant, ruby outputs a warning, probably on stderr.

<blush>
Apologies. I'd guessed/thought rspec might distinguish between errors
inside 'describe' and outside
</blush>

mv

>  (ab)
>
>
>  In case I use:
>
> # OG_ADAPTER = :dbi_sqlite
> OG_ADAPTER = :sqlite
>
> I see the green all passed.
>
> HTH?
>
> Mark
>
>
> On 9/4/07, Arne Brasseur <arne at arnebrasseur.net> wrote:
>
>
>  I found the problem, although it took some Sherlock Holmes style
> investigation. Turns out the butler... uh I mean the logger did it.
>
>  What's wrong with this code?
>
>  def info(str)
>  @@global_logger << Console::ANSICode.green
>  @@global_logger.info(str)
>  @@global_logger << Console::ANSICode.clear
>  end
>
>  def error(str)
>  @@global_logger << Console::ANSICode.red
>  @@global_logger.error(str)
>  @@global_logger << Console::ANSICode.clear
>  end
>
>  The solution can be found in/pulled from my repo :
> http://darcs.arnebrasseur.net/glycerin
>
>  (in /home/plexus/work/nitro_repo)
>  Running og... [ 1 specs - all passed ]
>  Running og/store/sql... [ 1 specs - all passed ]
>  Running og/validation... [ 1 specs - all passed ]
>  3 examples, 0 failures
>
>  No failing examples, let's add some tests!
>
>  (ab)
>
>  George Moschovitis schreef:
> Dear devs,
>
>  I have a little problem with the rspec infrastructure 'borrowed' from
> Ramaze.
>
>  when I run the (few) og tests with
>
>  rake test:og
>
>  I get:
>
>  (in /home/gmosx/code/public)
>  Running og... [ 1 specs - 0 failed ]
>  Running og/store/sql... [ 1 specs - 0 failed ]
>  Running og/validation... [ 1 specs - all passed ]
>  -------------------------------------[ og
> ]-------------------------------------
>  ExitStatus:
>  #<Process::Status: pid=13203,exited(0)>
>  StdOut:
>  Database "test" dropped
>  .
>
>  Finished in 0.136994 seconds
>
>  1 example, 0 failures
>
>  The problem seems to be that the system command used to drop the database
> before each test. It seems to trigger the error code in
> script/lib/wrap.rb...
>
>  If you run the tests one by one they work.
>
>  Michael, Jonathan, Arne, do you have any idea?
>
>  -g.
>
>
>  --
>  http://www.me.gr
>  http://phidz.com
>  http://blog.gmosx.com
>  http://cull.gr
>  http://www.joy.gr
>  http://nitroproject.org ________________________________
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>  --
> Arne Brasseur
> http://www.arnebrasseur.net
> arne at arnebrasseur.net
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>  _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
>
>  --
> Arne Brasseur
> http://www.arnebrasseur.net
> arne at arnebrasseur.net
>


More information about the Nitro-general mailing list