librelist archives

« back to archive

Integrity building successfully even with failing spec

Integrity building successfully even with failing spec

From:
Guilherme Cavalcanti
Date:
2011-08-05 @ 11:44
Hello,

I'm using Integrity with a rails + rspec project and the build is green (ok)
even if sobre spec fails. The build script is as follows:

bundle install --without=production && bundle exec rake ci:build --trace
RAILS_ENV=test

And the rake task ci:build does 4 simple things:

  task :copy_yml do
    system("cp 
#{Rails.root}/config/database.yml.ci#{Rails.root}/config/database.yml")
  end

  task :rspec do
    system("bundle exec rspec #{Rails.root}/spec")
  end

  desc "Prepare CI"
  task :build => ["ci:copy_yml", "db:create", "db:migrate", "ci:rspec"] do


Does anyone have any hint about that?

--
Guilherme Cavalcanti
+55 81 9194 5317
http://twitter.com/guiocavalcanti
http://linkedin.com/in/guiocavalcanti

Re: Integrity building successfully even with failing spec

From:
Guilherme Cavalcanti
Date:
2011-08-05 @ 11:50
Looking at integrity log, the last build output finishes as follows:

Finished in 798.87 seconds
1047 examples, 1 failure, 118 pending

Failed examples:

rspec ./spec/models/document_spec.rb:10 # Document validates a content_type
** Execute ci:build
E, [2011-08-05T08:28:24.285372 #9372] ERROR -- : Exception occured during
build: undefined method `short_identifier' for
#<Integrity::Commit:0xb6ef2b9c>


--
Guilherme Cavalcanti
+55 81 9194 5317
http://twitter.com/guiocavalcanti
http://linkedin.com/in/guiocavalcanti



On Fri, Aug 5, 2011 at 8:44 AM, Guilherme Cavalcanti <
guiocavalcanti@gmail.com> wrote:

> Hello,
>
> I'm using Integrity with a rails + rspec project and the build is green
> (ok) even if sobre spec fails. The build script is as follows:
>
> bundle install --without=production && bundle exec rake ci:build --trace
> RAILS_ENV=test
>
> And the rake task ci:build does 4 simple things:
>
>   task :copy_yml do
>     system("cp 
#{Rails.root}/config/database.yml.ci#{Rails.root}/config/database.yml")
>   end
>
>   task :rspec do
>     system("bundle exec rspec #{Rails.root}/spec")
>   end
>
>   desc "Prepare CI"
>   task :build => ["ci:copy_yml", "db:create", "db:migrate", "ci:rspec"] do
>
>
> Does anyone have any hint about that?
>
> --
> Guilherme Cavalcanti
> +55 81 9194 5317
> http://twitter.com/guiocavalcanti
> http://linkedin.com/in/guiocavalcanti
>
>