examen 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +91 -0
- data/Guardfile +40 -0
- data/LICENSE.txt +22 -0
- data/README.md +65 -0
- data/README.rdoc +65 -0
- data/Rakefile +25 -0
- data/doc/prct10.pdf +0 -0
- data/doc/prct5.pdf +0 -0
- data/doc/prct6.pdf +0 -0
- data/doc/prct7.pdf +0 -0
- data/doc/prct8.pdf +0 -0
- data/doc/prct9.pdf +0 -0
- data/doc/pruebas/index.html +430 -0
- data/examen.gemspec +29 -0
- data/html/Exam.html +296 -0
- data/html/Examen.html +119 -0
- data/html/ExamenIu.html +278 -0
- data/html/Lista.html +536 -0
- data/html/Object.html +119 -0
- data/html/Pregunta.html +361 -0
- data/html/PreguntaVerdaderoFalso.html +169 -0
- data/html/Quiz.html +363 -0
- data/html/README_rdoc.html +154 -0
- data/html/created.rid +11 -0
- data/html/fonts.css +167 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +178 -0
- data/html/js/darkfish.js +140 -0
- data/html/js/jquery.js +4 -0
- data/html/js/navigation.js +142 -0
- data/html/js/search.js +109 -0
- data/html/js/search_index.js +1 -0
- data/html/js/searcher.js +228 -0
- data/html/rdoc.css +580 -0
- data/html/table_of_contents.html +204 -0
- data/lib/examen.rb +3 -0
- data/lib/examen/base.rb +3 -0
- data/lib/examen/exam.rb +24 -0
- data/lib/examen/examen_iu.rb +38 -0
- data/lib/examen/lista.rb +108 -0
- data/lib/examen/pregunta.rb +38 -0
- data/lib/examen/pregunta_verdadero_falso.rb +16 -0
- data/lib/examen/quiz.rb +35 -0
- data/lib/examen/version.rb +4 -0
- data/spec/examen_spec.rb +334 -0
- data/spec/spec_helper.rb +99 -0
- metadata +229 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: df1b28da810f54986546ab7d57e91274e5b926a6
|
4
|
+
data.tar.gz: 65677a0771149b0f294156f25066df738ad41839
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b6eccf6862645ab3536bf93e6ebf7f626aee3a185397583df7a5ba6b61b195274acfdc022fc284263b74a82a8b6df9c8b91f78787bff312f5e7b1ae06cccab10
|
7
|
+
data.tar.gz: 446cc2f5a8cfe95ca9d1a242311f6fb47ee97fe05c20f6a20e53010cc30000ae529607f8ce2b2a2899e3628bf1971ffe732ec9078a17c02a627b67e13c6647f2
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
examen (1.2.4)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
celluloid (0.16.0)
|
10
|
+
timers (~> 4.0.0)
|
11
|
+
coderay (1.1.0)
|
12
|
+
coveralls (0.7.1)
|
13
|
+
multi_json (~> 1.3)
|
14
|
+
rest-client
|
15
|
+
simplecov (>= 0.7)
|
16
|
+
term-ansicolor
|
17
|
+
thor
|
18
|
+
diff-lcs (1.2.5)
|
19
|
+
docile (1.1.5)
|
20
|
+
ffi (1.9.6)
|
21
|
+
formatador (0.2.5)
|
22
|
+
guard (2.8.0)
|
23
|
+
formatador (>= 0.2.4)
|
24
|
+
listen (~> 2.7)
|
25
|
+
lumberjack (~> 1.0)
|
26
|
+
pry (>= 0.9.12)
|
27
|
+
thor (>= 0.18.1)
|
28
|
+
guard-bundler (2.0.0)
|
29
|
+
bundler (~> 1.0)
|
30
|
+
guard (~> 2.2)
|
31
|
+
guard-rspec (4.3.1)
|
32
|
+
guard (~> 2.1)
|
33
|
+
rspec (>= 2.14, < 4.0)
|
34
|
+
hitimes (1.2.2)
|
35
|
+
listen (2.7.11)
|
36
|
+
celluloid (>= 0.15.2)
|
37
|
+
rb-fsevent (>= 0.9.3)
|
38
|
+
rb-inotify (>= 0.9)
|
39
|
+
lumberjack (1.0.9)
|
40
|
+
method_source (0.8.2)
|
41
|
+
mime-types (2.4.3)
|
42
|
+
multi_json (1.10.1)
|
43
|
+
netrc (0.8.0)
|
44
|
+
pry (0.10.1)
|
45
|
+
coderay (~> 1.1.0)
|
46
|
+
method_source (~> 0.8.1)
|
47
|
+
slop (~> 3.4)
|
48
|
+
rake (10.3.2)
|
49
|
+
rb-fsevent (0.9.4)
|
50
|
+
rb-inotify (0.9.5)
|
51
|
+
ffi (>= 0.5.0)
|
52
|
+
rest-client (1.7.2)
|
53
|
+
mime-types (>= 1.16, < 3.0)
|
54
|
+
netrc (~> 0.7)
|
55
|
+
rspec (3.1.0)
|
56
|
+
rspec-core (~> 3.1.0)
|
57
|
+
rspec-expectations (~> 3.1.0)
|
58
|
+
rspec-mocks (~> 3.1.0)
|
59
|
+
rspec-core (3.1.7)
|
60
|
+
rspec-support (~> 3.1.0)
|
61
|
+
rspec-expectations (3.1.2)
|
62
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
+
rspec-support (~> 3.1.0)
|
64
|
+
rspec-mocks (3.1.3)
|
65
|
+
rspec-support (~> 3.1.0)
|
66
|
+
rspec-support (3.1.2)
|
67
|
+
simplecov (0.9.1)
|
68
|
+
docile (~> 1.1.0)
|
69
|
+
multi_json (~> 1.0)
|
70
|
+
simplecov-html (~> 0.8.0)
|
71
|
+
simplecov-html (0.8.0)
|
72
|
+
slop (3.6.0)
|
73
|
+
term-ansicolor (1.3.0)
|
74
|
+
tins (~> 1.0)
|
75
|
+
thor (0.19.1)
|
76
|
+
timers (4.0.1)
|
77
|
+
hitimes
|
78
|
+
tins (1.3.3)
|
79
|
+
|
80
|
+
PLATFORMS
|
81
|
+
ruby
|
82
|
+
|
83
|
+
DEPENDENCIES
|
84
|
+
bundler (~> 1.7)
|
85
|
+
coveralls
|
86
|
+
examen!
|
87
|
+
guard
|
88
|
+
guard-bundler
|
89
|
+
guard-rspec
|
90
|
+
rake
|
91
|
+
rspec
|
data/Guardfile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :bundler do
|
5
|
+
watch('Gemfile')
|
6
|
+
# Uncomment next line if your Gemfile contains the `gemspec' command.
|
7
|
+
# watch(/^.+\.gemspec/)
|
8
|
+
end
|
9
|
+
|
10
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
11
|
+
# rspec may be run, below are examples of the most common uses.
|
12
|
+
# * bundler: 'bundle exec rspec'
|
13
|
+
# * bundler binstubs: 'bin/rspec'
|
14
|
+
# * spring: 'bin/rsspec' (This will use spring if running and you have
|
15
|
+
# installed the spring binstubs per the docs)
|
16
|
+
# * zeus: 'zeus rspec' (requires the server to be started separetly)
|
17
|
+
# * 'just' rspec: 'rspec'
|
18
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
19
|
+
watch(%r{^spec/.+_spec\.rb$})
|
20
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
21
|
+
watch(%r{^lib/examen/(.+)\.rb$}) { "spec/examen_spec.rb" }
|
22
|
+
watch('spec/spec_helper.rb') { "spec" }
|
23
|
+
|
24
|
+
# Rails example
|
25
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
26
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
27
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
28
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
29
|
+
watch('config/routes.rb') { "spec/routing" }
|
30
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
31
|
+
watch('spec/rails_helper.rb') { "spec" }
|
32
|
+
|
33
|
+
# Capybara features specs
|
34
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
35
|
+
|
36
|
+
# Turnip features and steps
|
37
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
38
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
39
|
+
end
|
40
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 César Ravelo Martínez
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
Desarrollo de gema Ruby: Gestión de Exámenes
|
2
|
+
=======================
|
3
|
+
[](https://coveralls.io/r/alu0100600810/LPP_T_03?branch=master)
|
4
|
+
|
5
|
+
## Descripción del equipo
|
6
|
+
|
7
|
+
* Nombre del equipo: **LPP_T_3**
|
8
|
+
* Miembros del equipo:
|
9
|
+
* Ayose Jesús Castillo Barroso
|
10
|
+
* César Ravelo Martínez
|
11
|
+
|
12
|
+
## Descripción de la práctica
|
13
|
+
|
14
|
+
La práctica propone implementar una gema Ruby para representar exámenes de preguntas simples con pruebas RSpec para seguir el modelo TDD y su correcto funcionamiento. La estructura del repositorio es la siguiente:
|
15
|
+
|
16
|
+
* [Documentación](doc/)
|
17
|
+
* [Documentación de la Práctica](doc/)
|
18
|
+
* [Resultados de las Pruebas](doc/pruebas/index.html)
|
19
|
+
* [Librerías](lib/)
|
20
|
+
* [Gema Ruby](lib/examen/base.rb)
|
21
|
+
* [Código fuente de la clase Examen](lib/examen/examen.rb)
|
22
|
+
* [Código fuente de la clase Pregunta](lib/examen/pregunta.rb)
|
23
|
+
* [Códido fuente de la clase Pregunta Verdadero y Falso](lib/examen/pregunta_verdadero_falso.rb)
|
24
|
+
* [RSpec](spec/)
|
25
|
+
* [Fichero Rake con las tareas necesarias definidas](Rakefile)
|
26
|
+
* Fichero readme con esta documentación
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
# Examen
|
32
|
+
|
33
|
+
Gema Ruby para representar exámenes formados por preguntas de selección simple. La secuencia de preguntas que pueda formar un examen
|
34
|
+
viene definida como una lista enlazada simple definida en la misma clase Examen donde cada nodo representa una instancia de la clase Pregunta.
|
35
|
+
|
36
|
+
## Instalación
|
37
|
+
|
38
|
+
|
39
|
+
Añadir esta linea al Gemfile de su aplicación
|
40
|
+
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
gem 'examen'
|
44
|
+
```
|
45
|
+
|
46
|
+
y ejecutar:
|
47
|
+
|
48
|
+
$ bundle
|
49
|
+
|
50
|
+
O instálelo usted mismo:
|
51
|
+
|
52
|
+
$ gem install examen
|
53
|
+
|
54
|
+
## Uso
|
55
|
+
|
56
|
+
Para instanciar un objeto Pregunta basta con indicarle:
|
57
|
+
|
58
|
+
* Una pregunta
|
59
|
+
* Una respuesta correcta
|
60
|
+
* Un conjunto de respuestas erróneas
|
61
|
+
|
62
|
+
Puede mostrar por pantalla la pregunta invocando el método [:to_s](lib/examen/pregunta.rb).
|
63
|
+
|
64
|
+
Para instanciar un objeto Examen basta con indicarle una instancia de la clase Pregunta.
|
65
|
+
Puede mostrar por pantalla la pregunta invocando el método [:to_s](lib/examen/examen.rb).
|
data/README.rdoc
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
Desarrollo de gema Ruby: Gestión de Exámenes
|
2
|
+
=======================
|
3
|
+
[](https://coveralls.io/r/alu0100600810/LPP_T_03?branch=master)
|
4
|
+
|
5
|
+
## Descripción del equipo
|
6
|
+
|
7
|
+
* Nombre del equipo: **LPP_T_3**
|
8
|
+
* Miembros del equipo:
|
9
|
+
* Ayose Jesús Castillo Barroso
|
10
|
+
* César Ravelo Martínez
|
11
|
+
|
12
|
+
## Descripción de la práctica
|
13
|
+
|
14
|
+
La práctica propone implementar una gema Ruby para representar exámenes de preguntas simples con pruebas RSpec para seguir el modelo TDD y su correcto funcionamiento. La estructura del repositorio es la siguiente:
|
15
|
+
|
16
|
+
* [Documentación](doc/)
|
17
|
+
* [Documentación de la Práctica](doc/)
|
18
|
+
* [Resultados de las Pruebas](doc/pruebas/index.html)
|
19
|
+
* [Librerías](lib/)
|
20
|
+
* [Gema Ruby](lib/examen/base.rb)
|
21
|
+
* [Código fuente de la clase Examen](lib/examen/examen.rb)
|
22
|
+
* [Código fuente de la clase Pregunta](lib/examen/pregunta.rb)
|
23
|
+
* [Códido fuente de la clase Pregunta Verdadero y Falso](lib/examen/pregunta_verdadero_falso.rb)
|
24
|
+
* [RSpec](spec/)
|
25
|
+
* [Fichero Rake con las tareas necesarias definidas](Rakefile)
|
26
|
+
* Fichero readme con esta documentación
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
# Examen
|
32
|
+
|
33
|
+
Gema Ruby para representar exámenes formados por preguntas de selección simple. La secuencia de preguntas que pueda formar un examen
|
34
|
+
viene definida como una lista enlazada simple definida en la misma clase Examen donde cada nodo representa una instancia de la clase Pregunta.
|
35
|
+
|
36
|
+
## Instalación
|
37
|
+
|
38
|
+
|
39
|
+
Añadir esta linea al Gemfile de su aplicación
|
40
|
+
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
gem 'examen'
|
44
|
+
```
|
45
|
+
|
46
|
+
y ejecutar:
|
47
|
+
|
48
|
+
$ bundle
|
49
|
+
|
50
|
+
O instálelo usted mismo:
|
51
|
+
|
52
|
+
$ gem install examen
|
53
|
+
|
54
|
+
## Uso
|
55
|
+
|
56
|
+
Para instanciar un objeto Pregunta basta con indicarle:
|
57
|
+
|
58
|
+
* Una pregunta
|
59
|
+
* Una respuesta correcta
|
60
|
+
* Un conjunto de respuestas erróneas
|
61
|
+
|
62
|
+
Puede mostrar por pantalla la pregunta invocando el método [:to_s](lib/examen/pregunta.rb).
|
63
|
+
|
64
|
+
Para instanciar un objeto Examen basta con indicarle una instancia de la clase Pregunta.
|
65
|
+
Puede mostrar por pantalla la pregunta invocando el método [:to_s](lib/examen/examen.rb).
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift File.dirname(__FILE__) + 'lib'
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rdoc/task"
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
RSpec::Core::RakeTask.new
|
7
|
+
task :default=> :spec
|
8
|
+
|
9
|
+
Rake::RDocTask.new(:rdoc_dev) do |rd|
|
10
|
+
rd.main = "README.rdoc"
|
11
|
+
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
|
12
|
+
rd.options << "--all"
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
desc "Generar documentación de las pruebas (HTML)"
|
17
|
+
task :doc_HTML do
|
18
|
+
sh "rspec -I. -Ilib -Ilib/examen -Ispec spec/examen_spec.rb --format html > doc/pruebas/index.html"
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Generar documentación de las pruebas"
|
22
|
+
task :doc do
|
23
|
+
sh "rspec -I. -Ilib -Ilib/examen -Ispec spec/examen_spec.rb --format documentation"
|
24
|
+
end
|
25
|
+
|
data/doc/prct10.pdf
ADDED
Binary file
|
data/doc/prct5.pdf
ADDED
Binary file
|
data/doc/prct6.pdf
ADDED
Binary file
|
data/doc/prct7.pdf
ADDED
Binary file
|
data/doc/prct8.pdf
ADDED
Binary file
|
data/doc/prct9.pdf
ADDED
Binary file
|
@@ -0,0 +1,430 @@
|
|
1
|
+
[32m[Coveralls] Set up the SimpleCov formatter.[0m
|
2
|
+
[32m[Coveralls] Using SimpleCov's default settings.[0m
|
3
|
+
<!DOCTYPE html>
|
4
|
+
<html lang='en'>
|
5
|
+
<head>
|
6
|
+
<title>RSpec results</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<meta http-equiv="Expires" content="-1" />
|
9
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
10
|
+
<style type="text/css">
|
11
|
+
body {
|
12
|
+
margin: 0;
|
13
|
+
padding: 0;
|
14
|
+
background: #fff;
|
15
|
+
font-size: 80%;
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
<script type="text/javascript">
|
19
|
+
// <![CDATA[
|
20
|
+
|
21
|
+
function addClass(element_id, classname) {
|
22
|
+
document.getElementById(element_id).className += (" " + classname);
|
23
|
+
}
|
24
|
+
|
25
|
+
function removeClass(element_id, classname) {
|
26
|
+
var elem = document.getElementById(element_id);
|
27
|
+
var classlist = elem.className.replace(classname,'');
|
28
|
+
elem.className = classlist;
|
29
|
+
}
|
30
|
+
|
31
|
+
function moveProgressBar(percentDone) {
|
32
|
+
document.getElementById("rspec-header").style.width = percentDone +"%";
|
33
|
+
}
|
34
|
+
|
35
|
+
function makeRed(element_id) {
|
36
|
+
removeClass(element_id, 'passed');
|
37
|
+
removeClass(element_id, 'not_implemented');
|
38
|
+
addClass(element_id,'failed');
|
39
|
+
}
|
40
|
+
|
41
|
+
function makeYellow(element_id) {
|
42
|
+
var elem = document.getElementById(element_id);
|
43
|
+
if (elem.className.indexOf("failed") == -1) { // class doesn't includes failed
|
44
|
+
if (elem.className.indexOf("not_implemented") == -1) { // class doesn't include not_implemented
|
45
|
+
removeClass(element_id, 'passed');
|
46
|
+
addClass(element_id,'not_implemented');
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
function apply_filters() {
|
52
|
+
var passed_filter = document.getElementById('passed_checkbox').checked;
|
53
|
+
var failed_filter = document.getElementById('failed_checkbox').checked;
|
54
|
+
var pending_filter = document.getElementById('pending_checkbox').checked;
|
55
|
+
|
56
|
+
assign_display_style("example passed", passed_filter);
|
57
|
+
assign_display_style("example failed", failed_filter);
|
58
|
+
assign_display_style("example not_implemented", pending_filter);
|
59
|
+
|
60
|
+
assign_display_style_for_group("example_group passed", passed_filter);
|
61
|
+
assign_display_style_for_group("example_group not_implemented", pending_filter, pending_filter || passed_filter);
|
62
|
+
assign_display_style_for_group("example_group failed", failed_filter, failed_filter || pending_filter || passed_filter);
|
63
|
+
}
|
64
|
+
|
65
|
+
function get_display_style(display_flag) {
|
66
|
+
var style_mode = 'none';
|
67
|
+
if (display_flag == true) {
|
68
|
+
style_mode = 'block';
|
69
|
+
}
|
70
|
+
return style_mode;
|
71
|
+
}
|
72
|
+
|
73
|
+
function assign_display_style(classname, display_flag) {
|
74
|
+
var style_mode = get_display_style(display_flag);
|
75
|
+
var elems = document.getElementsByClassName(classname)
|
76
|
+
for (var i=0; i<elems.length;i++) {
|
77
|
+
elems[i].style.display = style_mode;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
function assign_display_style_for_group(classname, display_flag, subgroup_flag) {
|
82
|
+
var display_style_mode = get_display_style(display_flag);
|
83
|
+
var subgroup_style_mode = get_display_style(subgroup_flag);
|
84
|
+
var elems = document.getElementsByClassName(classname)
|
85
|
+
for (var i=0; i<elems.length;i++) {
|
86
|
+
var style_mode = display_style_mode;
|
87
|
+
if ((display_flag != subgroup_flag) && (elems[i].getElementsByTagName('dt')[0].innerHTML.indexOf(", ") != -1)) {
|
88
|
+
elems[i].style.display = subgroup_style_mode;
|
89
|
+
} else {
|
90
|
+
elems[i].style.display = display_style_mode;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
// ]]>
|
96
|
+
</script>
|
97
|
+
<style type="text/css">
|
98
|
+
#rspec-header {
|
99
|
+
background: #65C400; color: #fff; height: 4em;
|
100
|
+
}
|
101
|
+
|
102
|
+
.rspec-report h1 {
|
103
|
+
margin: 0px 10px 0px 10px;
|
104
|
+
padding: 10px;
|
105
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
106
|
+
font-size: 1.8em;
|
107
|
+
position: absolute;
|
108
|
+
}
|
109
|
+
|
110
|
+
#label {
|
111
|
+
float:left;
|
112
|
+
}
|
113
|
+
|
114
|
+
#display-filters {
|
115
|
+
float:left;
|
116
|
+
padding: 28px 0 0 40%;
|
117
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
118
|
+
}
|
119
|
+
|
120
|
+
#summary {
|
121
|
+
float:right;
|
122
|
+
padding: 5px 10px;
|
123
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
124
|
+
text-align: right;
|
125
|
+
}
|
126
|
+
|
127
|
+
#summary p {
|
128
|
+
margin: 0 0 0 2px;
|
129
|
+
}
|
130
|
+
|
131
|
+
#summary #totals {
|
132
|
+
font-size: 1.2em;
|
133
|
+
}
|
134
|
+
|
135
|
+
.example_group {
|
136
|
+
margin: 0 10px 5px;
|
137
|
+
background: #fff;
|
138
|
+
}
|
139
|
+
|
140
|
+
dl {
|
141
|
+
margin: 0; padding: 0 0 5px;
|
142
|
+
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
|
143
|
+
}
|
144
|
+
|
145
|
+
dt {
|
146
|
+
padding: 3px;
|
147
|
+
background: #65C400;
|
148
|
+
color: #fff;
|
149
|
+
font-weight: bold;
|
150
|
+
}
|
151
|
+
|
152
|
+
dd {
|
153
|
+
margin: 5px 0 5px 5px;
|
154
|
+
padding: 3px 3px 3px 18px;
|
155
|
+
}
|
156
|
+
|
157
|
+
dd .duration {
|
158
|
+
padding-left: 5px;
|
159
|
+
text-align: right;
|
160
|
+
right: 0px;
|
161
|
+
float:right;
|
162
|
+
}
|
163
|
+
|
164
|
+
dd.example.passed {
|
165
|
+
border-left: 5px solid #65C400;
|
166
|
+
border-bottom: 1px solid #65C400;
|
167
|
+
background: #DBFFB4; color: #3D7700;
|
168
|
+
}
|
169
|
+
|
170
|
+
dd.example.not_implemented {
|
171
|
+
border-left: 5px solid #FAF834;
|
172
|
+
border-bottom: 1px solid #FAF834;
|
173
|
+
background: #FCFB98; color: #131313;
|
174
|
+
}
|
175
|
+
|
176
|
+
dd.example.pending_fixed {
|
177
|
+
border-left: 5px solid #0000C2;
|
178
|
+
border-bottom: 1px solid #0000C2;
|
179
|
+
color: #0000C2; background: #D3FBFF;
|
180
|
+
}
|
181
|
+
|
182
|
+
dd.example.failed {
|
183
|
+
border-left: 5px solid #C20000;
|
184
|
+
border-bottom: 1px solid #C20000;
|
185
|
+
color: #C20000; background: #FFFBD3;
|
186
|
+
}
|
187
|
+
|
188
|
+
|
189
|
+
dt.not_implemented {
|
190
|
+
color: #000000; background: #FAF834;
|
191
|
+
}
|
192
|
+
|
193
|
+
dt.pending_fixed {
|
194
|
+
color: #FFFFFF; background: #C40D0D;
|
195
|
+
}
|
196
|
+
|
197
|
+
dt.failed {
|
198
|
+
color: #FFFFFF; background: #C40D0D;
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
#rspec-header.not_implemented {
|
203
|
+
color: #000000; background: #FAF834;
|
204
|
+
}
|
205
|
+
|
206
|
+
#rspec-header.pending_fixed {
|
207
|
+
color: #FFFFFF; background: #C40D0D;
|
208
|
+
}
|
209
|
+
|
210
|
+
#rspec-header.failed {
|
211
|
+
color: #FFFFFF; background: #C40D0D;
|
212
|
+
}
|
213
|
+
|
214
|
+
|
215
|
+
.backtrace {
|
216
|
+
color: #000;
|
217
|
+
font-size: 12px;
|
218
|
+
}
|
219
|
+
|
220
|
+
a {
|
221
|
+
color: #BE5C00;
|
222
|
+
}
|
223
|
+
|
224
|
+
/* Ruby code, style similar to vibrant ink */
|
225
|
+
.ruby {
|
226
|
+
font-size: 12px;
|
227
|
+
font-family: monospace;
|
228
|
+
color: white;
|
229
|
+
background-color: black;
|
230
|
+
padding: 0.1em 0 0.2em 0;
|
231
|
+
}
|
232
|
+
|
233
|
+
.ruby .keyword { color: #FF6600; }
|
234
|
+
.ruby .constant { color: #339999; }
|
235
|
+
.ruby .attribute { color: white; }
|
236
|
+
.ruby .global { color: white; }
|
237
|
+
.ruby .module { color: white; }
|
238
|
+
.ruby .class { color: white; }
|
239
|
+
.ruby .string { color: #66FF00; }
|
240
|
+
.ruby .ident { color: white; }
|
241
|
+
.ruby .method { color: #FFCC00; }
|
242
|
+
.ruby .number { color: white; }
|
243
|
+
.ruby .char { color: white; }
|
244
|
+
.ruby .comment { color: #9933CC; }
|
245
|
+
.ruby .symbol { color: white; }
|
246
|
+
.ruby .regex { color: #44B4CC; }
|
247
|
+
.ruby .punct { color: white; }
|
248
|
+
.ruby .escape { color: white; }
|
249
|
+
.ruby .interp { color: white; }
|
250
|
+
.ruby .expr { color: white; }
|
251
|
+
|
252
|
+
.ruby .offending { background-color: gray; }
|
253
|
+
.ruby .linenum {
|
254
|
+
width: 75px;
|
255
|
+
padding: 0.1em 1em 0.2em 0;
|
256
|
+
color: #000000;
|
257
|
+
background-color: #FFFBD3;
|
258
|
+
}
|
259
|
+
|
260
|
+
</style>
|
261
|
+
</head>
|
262
|
+
<body>
|
263
|
+
<div class="rspec-report">
|
264
|
+
|
265
|
+
<div id="rspec-header">
|
266
|
+
<div id="label">
|
267
|
+
<h1>RSpec Code Examples</h1>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div id="display-filters">
|
271
|
+
<input id="passed_checkbox" name="passed_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="1" /> <label for="passed_checkbox">Passed</label>
|
272
|
+
<input id="failed_checkbox" name="failed_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="2" /> <label for="failed_checkbox">Failed</label>
|
273
|
+
<input id="pending_checkbox" name="pending_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="3" /> <label for="pending_checkbox">Pending</label>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div id="summary">
|
277
|
+
<p id="totals"> </p>
|
278
|
+
<p id="duration"> </p>
|
279
|
+
</div>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
|
283
|
+
<div class="results">
|
284
|
+
<div id="div_group_1" class="example_group passed">
|
285
|
+
<dl style="margin-left: 0px;">
|
286
|
+
<dt id="example_group_1" class="passed">ExamenIu</dt>
|
287
|
+
</dl>
|
288
|
+
</div>
|
289
|
+
<div id="div_group_2" class="example_group passed">
|
290
|
+
<dl style="margin-left: 15px;">
|
291
|
+
<dt id="example_group_2" class="passed">ExamenIu</dt>
|
292
|
+
<script type="text/javascript">moveProgressBar('2.2');</script>
|
293
|
+
<dd class="example passed"><span class="passed_spec_name">Debe tener un metodo test</span><span class='duration'>0.00128s</span></dd>
|
294
|
+
<script type="text/javascript">moveProgressBar('4.4');</script>
|
295
|
+
<dd class="example passed"><span class="passed_spec_name">Debe inicializarse con una pregunta</span><span class='duration'>0.00162s</span></dd>
|
296
|
+
<script type="text/javascript">moveProgressBar('6.6');</script>
|
297
|
+
<dd class="example passed"><span class="passed_spec_name">Debe tener un atributo examen</span><span class='duration'>0.00024s</span></dd>
|
298
|
+
</dl>
|
299
|
+
</div>
|
300
|
+
<div id="div_group_3" class="example_group passed">
|
301
|
+
<dl style="margin-left: 0px;">
|
302
|
+
<dt id="example_group_3" class="passed">Examen</dt>
|
303
|
+
</dl>
|
304
|
+
</div>
|
305
|
+
<div id="div_group_4" class="example_group passed">
|
306
|
+
<dl style="margin-left: 15px;">
|
307
|
+
<dt id="example_group_4" class="passed">Exam</dt>
|
308
|
+
<script type="text/javascript">moveProgressBar('8.8');</script>
|
309
|
+
<dd class="example passed"><span class="passed_spec_name">Se puede insertar varios elementos</span><span class='duration'>0.00065s</span></dd>
|
310
|
+
<script type="text/javascript">moveProgressBar('11.1');</script>
|
311
|
+
<dd class="example passed"><span class="passed_spec_name">Debe mostrarse correctamente el examen</span><span class='duration'>0.00085s</span></dd>
|
312
|
+
<script type="text/javascript">moveProgressBar('13.3');</script>
|
313
|
+
<dd class="example passed"><span class="passed_spec_name">Debe mostrar por pantalla el examen</span><span class='duration'>0.00012s</span></dd>
|
314
|
+
<script type="text/javascript">moveProgressBar('15.5');</script>
|
315
|
+
<dd class="example passed"><span class="passed_spec_name">Debe inicializarse con una pregunta</span><span class='duration'>0.00034s</span></dd>
|
316
|
+
<script type="text/javascript">moveProgressBar('17.7');</script>
|
317
|
+
<dd class="example passed"><span class="passed_spec_name">Debe tener un atributo lista</span><span class='duration'>0.00011s</span></dd>
|
318
|
+
<script type="text/javascript">moveProgressBar('20.0');</script>
|
319
|
+
<dd class="example passed"><span class="passed_spec_name">Se puede insertar un elemento</span><span class='duration'>0.00018s</span></dd>
|
320
|
+
</dl>
|
321
|
+
</div>
|
322
|
+
<div id="div_group_5" class="example_group passed">
|
323
|
+
<dl style="margin-left: 15px;">
|
324
|
+
<dt id="example_group_5" class="passed">Lista</dt>
|
325
|
+
<script type="text/javascript">moveProgressBar('22.2');</script>
|
326
|
+
<dd class="example passed"><span class="passed_spec_name">Debe saber contar</span><span class='duration'>0.00022s</span></dd>
|
327
|
+
<script type="text/javascript">moveProgressBar('24.4');</script>
|
328
|
+
<dd class="example passed"><span class="passed_spec_name">Debe inicializarse con una pregunta</span><span class='duration'>0.00021s</span></dd>
|
329
|
+
<script type="text/javascript">moveProgressBar('26.6');</script>
|
330
|
+
<dd class="example passed"><span class="passed_spec_name">Debe indicar el maximo</span><span class='duration'>0.00098s</span></dd>
|
331
|
+
<script type="text/javascript">moveProgressBar('28.8');</script>
|
332
|
+
<dd class="example passed"><span class="passed_spec_name">Debe encontrar correctamente</span><span class='duration'>0.00013s</span></dd>
|
333
|
+
<script type="text/javascript">moveProgressBar('31.1');</script>
|
334
|
+
<dd class="example passed"><span class="passed_spec_name">Debe mostrarse correctamente</span><span class='duration'>0.00057s</span></dd>
|
335
|
+
<script type="text/javascript">moveProgressBar('33.3');</script>
|
336
|
+
<dd class="example passed"><span class="passed_spec_name">Debe incluir el modulo enumerable</span><span class='duration'>0.00059s</span></dd>
|
337
|
+
<script type="text/javascript">moveProgressBar('35.5');</script>
|
338
|
+
<dd class="example passed"><span class="passed_spec_name">Debe saber usar all?</span><span class='duration'>0.00013s</span></dd>
|
339
|
+
<script type="text/javascript">moveProgressBar('37.7');</script>
|
340
|
+
<dd class="example passed"><span class="passed_spec_name">Se puede insertar varios elementos</span><span class='duration'>0.00013s</span></dd>
|
341
|
+
<script type="text/javascript">moveProgressBar('40.0');</script>
|
342
|
+
<dd class="example passed"><span class="passed_spec_name">Debe ordenar correctamente</span><span class='duration'>0.00024s</span></dd>
|
343
|
+
<script type="text/javascript">moveProgressBar('42.2');</script>
|
344
|
+
<dd class="example passed"><span class="passed_spec_name">Debe indicar el minimo</span><span class='duration'>0.00012s</span></dd>
|
345
|
+
<script type="text/javascript">moveProgressBar('44.4');</script>
|
346
|
+
<dd class="example passed"><span class="passed_spec_name">Se puede insertar un elemento</span><span class='duration'>0.00019s</span></dd>
|
347
|
+
<script type="text/javascript">moveProgressBar('46.6');</script>
|
348
|
+
<dd class="example passed"><span class="passed_spec_name">Se puede extraer el primer elemento de la lista</span><span class='duration'>0.00011s</span></dd>
|
349
|
+
<script type="text/javascript">moveProgressBar('48.8');</script>
|
350
|
+
<dd class="example passed"><span class="passed_spec_name">Debe existir una lista con su cabeza</span><span class='duration'>0.00021s</span></dd>
|
351
|
+
</dl>
|
352
|
+
</div>
|
353
|
+
<div id="div_group_6" class="example_group passed">
|
354
|
+
<dl style="margin-left: 15px;">
|
355
|
+
<dt id="example_group_6" class="passed">Nodo</dt>
|
356
|
+
<script type="text/javascript">moveProgressBar('51.1');</script>
|
357
|
+
<dd class="example passed"><span class="passed_spec_name">Debe existir un nodo de la lista con sus datos con su siguiente y su anterior</span><span class='duration'>0.00010s</span></dd>
|
358
|
+
</dl>
|
359
|
+
</div>
|
360
|
+
<div id="div_group_7" class="example_group passed">
|
361
|
+
<dl style="margin-left: 0px;">
|
362
|
+
<dt id="example_group_7" class="passed">Examen</dt>
|
363
|
+
</dl>
|
364
|
+
</div>
|
365
|
+
<div id="div_group_8" class="example_group passed">
|
366
|
+
<dl style="margin-left: 15px;">
|
367
|
+
<dt id="example_group_8" class="passed">Pregunta</dt>
|
368
|
+
<script type="text/javascript">moveProgressBar('53.3');</script>
|
369
|
+
<dd class="example passed"><span class="passed_spec_name">Debe indicar su dificultad</span><span class='duration'>0.00021s</span></dd>
|
370
|
+
<script type="text/javascript">moveProgressBar('55.5');</script>
|
371
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar opciones incorrectas</span><span class='duration'>0.00010s</span></dd>
|
372
|
+
<script type="text/javascript">moveProgressBar('57.7');</script>
|
373
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar pregunta</span><span class='duration'>0.00015s</span></dd>
|
374
|
+
<script type="text/javascript">moveProgressBar('60.0');</script>
|
375
|
+
<dd class="example passed"><span class="passed_spec_name">Debe incluir el modulo comparable</span><span class='duration'>0.00010s</span></dd>
|
376
|
+
<script type="text/javascript">moveProgressBar('62.2');</script>
|
377
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar por pantalla</span><span class='duration'>0.00010s</span></dd>
|
378
|
+
<script type="text/javascript">moveProgressBar('64.4');</script>
|
379
|
+
<dd class="example passed"><span class="passed_spec_name">debe tener 3 componentes</span><span class='duration'>0.00013s</span></dd>
|
380
|
+
<script type="text/javascript">moveProgressBar('66.6');</script>
|
381
|
+
<dd class="example passed"><span class="passed_spec_name">Debe comparase con otra pregunta correctamente</span><span class='duration'>0.00014s</span></dd>
|
382
|
+
<script type="text/javascript">moveProgressBar('68.8');</script>
|
383
|
+
<dd class="example passed"><span class="passed_spec_name">mostrarse correctamente</span><span class='duration'>0.00018s</span></dd>
|
384
|
+
<script type="text/javascript">moveProgressBar('71.1');</script>
|
385
|
+
<dd class="example passed"><span class="passed_spec_name">Debe tener texto y alguna pregunta</span><span class='duration'>0.00009s</span></dd>
|
386
|
+
<script type="text/javascript">moveProgressBar('73.3');</script>
|
387
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar respuesta correcta</span><span class='duration'>0.00010s</span></dd>
|
388
|
+
</dl>
|
389
|
+
</div>
|
390
|
+
<div id="div_group_9" class="example_group passed">
|
391
|
+
<dl style="margin-left: 0px;">
|
392
|
+
<dt id="example_group_9" class="passed">Examen</dt>
|
393
|
+
</dl>
|
394
|
+
</div>
|
395
|
+
<div id="div_group_10" class="example_group passed">
|
396
|
+
<dl style="margin-left: 15px;">
|
397
|
+
<dt id="example_group_10" class="passed">Pregunta Verdadero y Falso</dt>
|
398
|
+
<script type="text/javascript">moveProgressBar('75.5');</script>
|
399
|
+
<dd class="example passed"><span class="passed_spec_name">Debe incluir el modulo comparable</span><span class='duration'>0.00011s</span></dd>
|
400
|
+
<script type="text/javascript">moveProgressBar('77.7');</script>
|
401
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar pregunta</span><span class='duration'>0.00010s</span></dd>
|
402
|
+
<script type="text/javascript">moveProgressBar('80.0');</script>
|
403
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar por pantalla</span><span class='duration'>0.00010s</span></dd>
|
404
|
+
<script type="text/javascript">moveProgressBar('82.2');</script>
|
405
|
+
<dd class="example passed"><span class="passed_spec_name">Debe comparase con otra pregunta correctamente</span><span class='duration'>0.00024s</span></dd>
|
406
|
+
<script type="text/javascript">moveProgressBar('84.4');</script>
|
407
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar respuesta correcta</span><span class='duration'>0.00010s</span></dd>
|
408
|
+
<script type="text/javascript">moveProgressBar('86.6');</script>
|
409
|
+
<dd class="example passed"><span class="passed_spec_name">mostrar opciones incorrectas</span><span class='duration'>0.00010s</span></dd>
|
410
|
+
<script type="text/javascript">moveProgressBar('88.8');</script>
|
411
|
+
<dd class="example passed"><span class="passed_spec_name">mostrarse correctamente</span><span class='duration'>0.00027s</span></dd>
|
412
|
+
<script type="text/javascript">moveProgressBar('91.1');</script>
|
413
|
+
<dd class="example passed"><span class="passed_spec_name">Debe no ser instancia de Pregunta</span><span class='duration'>0.00010s</span></dd>
|
414
|
+
<script type="text/javascript">moveProgressBar('93.3');</script>
|
415
|
+
<dd class="example passed"><span class="passed_spec_name">Debe indicar su dificultad</span><span class='duration'>0.00010s</span></dd>
|
416
|
+
<script type="text/javascript">moveProgressBar('95.5');</script>
|
417
|
+
<dd class="example passed"><span class="passed_spec_name">Debe heredar de Pregunta</span><span class='duration'>0.00024s</span></dd>
|
418
|
+
<script type="text/javascript">moveProgressBar('97.7');</script>
|
419
|
+
<dd class="example passed"><span class="passed_spec_name">Debe tener texto y alguna pregunta</span><span class='duration'>0.00009s</span></dd>
|
420
|
+
<script type="text/javascript">moveProgressBar('100.0');</script>
|
421
|
+
<dd class="example passed"><span class="passed_spec_name">debe tener 2 componentes</span><span class='duration'>0.00013s</span></dd>
|
422
|
+
</dl>
|
423
|
+
</div>
|
424
|
+
<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.01809 seconds</strong>";</script>
|
425
|
+
<script type="text/javascript">document.getElementById('totals').innerHTML = "45 examples, 0 failures";</script>
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
</body>
|
429
|
+
</html>
|
430
|
+
[33m[Coveralls] Outside the Travis environment, not sending data.[0m
|