borja /
herobravo
| 1 | # CI Engines requirements: |
||
| 2 | require 'coveralls' |
||
| 3 | Coveralls.wear! |
||
| 4 | |||
| 5 | # https://github.com/codeclimate/ruby-test-reporter/blob/master/README.md |
||
| 6 | # 'codeclimate-test-reporter' was replaced |
||
| 7 | require 'simplecov' |
||
| 8 | SimpleCov.start do |
||
| 9 | add_filter "/lib/" # Lib methods will be ignored. |
||
| 10 | end |
||
| 11 | |||
| 12 | require 'codecov' |
||
| 13 | SimpleCov.formatter = SimpleCov::Formatter::Codecov |
||
| 14 | |||
| 15 | require 'scrutinizer/ocular' |
||
| 16 | Scrutinizer::Ocular.watch! |
||
| 17 | |||
| 18 | ENV['RACK_ENV'] = 'test' |
||
| 19 | require 'minitest/autorun' |
||
| 20 | require 'rack/test' |
||
| 21 | require_relative 'app.rb' |
||
| 22 | require 'require_all' |
||
| 23 | require 'rspec' |
||
| 24 | require 'yaml-lint' |
||
| 25 | |||
| 26 | # Fake Data Base |
||
| 27 | require_all './data' |
||
| 28 | require_all './model' |
||
| 29 | require_all './lib' |
||
| 30 | |||
| 31 | include Rack::Test::Methods |
||
| 32 | |||
| 33 | def app |
||
| 34 | Sinatra::Application |
||
| 35 | end |
||
| 36 | |||
| 37 | puts '[TEST] Class: hero' |
||
| 38 | describe '.hero' do |
||
| 39 | it 'should say true' do |
||
| 40 | heros.each_with_index do |h, i| |
||
| 41 | !hero(i).personaje.nil? |
||
| 42 | !hero(i).nivel.nil? |
||
| 43 | !hero(i).jugador.nil? |
||
| 44 | File.exist?(h.big_path) |
||
| 45 | hero(i).id == i |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 46 | hero(i).mente >= 4 |
||
|
0 ignored issues
–
show
|
|||
| 47 | hero(i).cuerpo >= 4 |
||
| 48 | hero(i).reputacion >= 0 |
||
| 49 | end |
||
| 50 | end |
||
| 51 | end |
||
| 52 |