ExamSimple 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +15 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +5 -0
  6. data/Exam.gemspec +28 -0
  7. data/Gemfile +8 -0
  8. data/Guardfile +41 -0
  9. data/LICENSE.txt +22 -0
  10. data/README.md +48 -0
  11. data/README.rdoc +0 -0
  12. data/Rakefile +24 -0
  13. data/doc/prct10.pdf +0 -0
  14. data/doc/prct11.pdf +0 -0
  15. data/doc/prct5.pdf +0 -0
  16. data/doc/prct6.pdf +0 -0
  17. data/doc/prct7.pdf +0 -0
  18. data/doc/prct8.pdf +0 -0
  19. data/doc/prct9.pdf +0 -0
  20. data/doc/test/index.html +467 -0
  21. data/html/Exam.html +316 -0
  22. data/html/Examui.html +230 -0
  23. data/html/List.html +469 -0
  24. data/html/Object.html +119 -0
  25. data/html/Question.html +357 -0
  26. data/html/README_rdoc.html +82 -0
  27. data/html/TrueOrFalse.html +169 -0
  28. data/html/created.rid +10 -0
  29. data/html/fonts.css +167 -0
  30. data/html/fonts/Lato-Light.ttf +0 -0
  31. data/html/fonts/Lato-LightItalic.ttf +0 -0
  32. data/html/fonts/Lato-Regular.ttf +0 -0
  33. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  34. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  35. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  36. data/html/images/add.png +0 -0
  37. data/html/images/arrow_up.png +0 -0
  38. data/html/images/brick.png +0 -0
  39. data/html/images/brick_link.png +0 -0
  40. data/html/images/bug.png +0 -0
  41. data/html/images/bullet_black.png +0 -0
  42. data/html/images/bullet_toggle_minus.png +0 -0
  43. data/html/images/bullet_toggle_plus.png +0 -0
  44. data/html/images/date.png +0 -0
  45. data/html/images/delete.png +0 -0
  46. data/html/images/find.png +0 -0
  47. data/html/images/loadingAnimation.gif +0 -0
  48. data/html/images/macFFBgHack.png +0 -0
  49. data/html/images/package.png +0 -0
  50. data/html/images/page_green.png +0 -0
  51. data/html/images/page_white_text.png +0 -0
  52. data/html/images/page_white_width.png +0 -0
  53. data/html/images/plugin.png +0 -0
  54. data/html/images/ruby.png +0 -0
  55. data/html/images/tag_blue.png +0 -0
  56. data/html/images/tag_green.png +0 -0
  57. data/html/images/transparent.png +0 -0
  58. data/html/images/wrench.png +0 -0
  59. data/html/images/wrench_orange.png +0 -0
  60. data/html/images/zoom.png +0 -0
  61. data/html/index.html +102 -0
  62. data/html/js/darkfish.js +140 -0
  63. data/html/js/jquery.js +18 -0
  64. data/html/js/navigation.js +142 -0
  65. data/html/js/search.js +109 -0
  66. data/html/js/search_index.js +1 -0
  67. data/html/js/searcher.js +228 -0
  68. data/html/rdoc.css +580 -0
  69. data/html/table_of_contents.html +159 -0
  70. data/lib/Exam.rb +2 -0
  71. data/lib/Exam/base.rb +5 -0
  72. data/lib/Exam/examen.rb +37 -0
  73. data/lib/Exam/examui.rb +27 -0
  74. data/lib/Exam/list.rb +106 -0
  75. data/lib/Exam/question.rb +44 -0
  76. data/lib/Exam/quiz.rb +52 -0
  77. data/lib/Exam/trueorfalse.rb +15 -0
  78. data/lib/Exam/version.rb +5 -0
  79. data/spec/Exam_spec.rb +392 -0
  80. data/spec/spec_helper.rb +98 -0
  81. metadata +226 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b02aaf2d95a12f9076da14d21c8254253f30024a
4
+ data.tar.gz: d96e36131e578d172917317127e3a83da5401a90
5
+ SHA512:
6
+ metadata.gz: f353a1c70c8747126fb484f77da546fe87b3d7669d400b920e457587199cf07091e992c22b76a5c3e7f299295cdb0b695647bc8e9c338517a502cf6393950a75
7
+ data.tar.gz: da19c1fecb86b8628af7e2b7cec2293bd66b29d9515aa967ab82a4256793a651f8c9d4066515d83cfdb69d0cd9b3c30142807e5b2020b92f74e0c031f69899af
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.bundle
10
+ *.so
11
+ *.o
12
+ *.a
13
+ mkmf.log
14
+ *~
15
+ *.*~
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format progress
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - jruby-19mode # JRuby in 1.9 mode
5
+ - 2.1.3
data/Exam.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'Exam/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ExamSimple"
8
+ spec.version = Exam::VERSION
9
+ spec.authors = ["Simón Fuertes", "Nuria Gonzalo"]
10
+ spec.email = ["alu0100625066@edu.ull.com", "alu0100598155@edu.ull.com"]
11
+ spec.summary = %q{Gema de realizacion de examenes tipo test}
12
+ spec.description = %q{Gema de realizacion de examenes tipo test}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib", "lib/Exam"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec", "~> 2.11"
24
+ spec.add_development_dependency "guard"
25
+ spec.add_development_dependency "guard-rspec"
26
+ spec.add_development_dependency "guard-bundler"
27
+ spec.add_development_dependency "coveralls"
28
+ end
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development, :test do
4
+ gem 'rspec'
5
+ end
6
+
7
+ # Specify your gem's dependencies in LPP_T_02-Question.gemspec
8
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,41 @@
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
+
19
+
20
+ guard :rspec, cmd: 'bundle exec rspec' do
21
+ watch(%r{^spec/.+_spec\.rb$})
22
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/Exam_spec.rb" }
23
+ watch('spec/spec_helper.rb') { "spec" }
24
+
25
+ # Rails example
26
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
27
+ watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
28
+ 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"] }
29
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
30
+ watch('config/routes.rb') { "spec/routing" }
31
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
32
+ watch('spec/rails_helper.rb') { "spec" }
33
+
34
+ # Capybara features specs
35
+ watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
36
+
37
+ # Turnip features and steps
38
+ watch(%r{^spec/acceptance/(.+)\.feature$})
39
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
40
+ end
41
+
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Simón Fuertes
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,48 @@
1
+ [![Build Status](https://travis-ci.org/crguezl/sinatra-capybara-selenium.svg?branch=master)](https://travis-ci.org/crguezl/sinatra-capybara-selenium)
2
+ [![Coverage Status](https://coveralls.io/repos/crguezl/sample-ruby-project/badge.png?branch=master)](https://coveralls.io/r/crguezl/sample-ruby-project?branch=master)
3
+
4
+
5
+ # Integrantes
6
+
7
+ Grupo: LPP_T_02
8
+ Simón Fuertes Sánchez **(Coordinador)**
9
+ Nuria Gonzalo Soto
10
+ _______________________________________________________________________
11
+
12
+ # LPPT02::Exam
13
+
14
+ Prct5(2ªvesrión) -> En esta práctica procedemos a crear nuestra primera gema, esta gema contiene una clase que genera preguntas de tipo test con respuesta simple. Para ello le pasamos tres argumentos (primero, la pregunta, segundo, la respuesta correcta, y tercera, otras
15
+ opciones de respuesta como distractores).
16
+
17
+ Prct6-> A partir de la gema creada en la anterior práctica, deberemos representar preguntas simples de exámenes con pruebas RSpec para seguir el modelo TDD. Para ello tenemos que representar y gestionar listas enlazadas (Linked List), ya que en Ruby no existe un objeto 'List' se deberá hacer mediante 'Arrays'.
18
+
19
+ Pract7 -> para esta práctica, partiendo de la anterior, se deberá crear una jerarquía de clases sobre la pregunta simple. Se deberá representar y gestionar listas enlazadas de forma que se puede recorrer en ambos sentidos.
20
+
21
+
22
+ ## Instalación
23
+
24
+ Añade la siguiente línea a tu archivo Gemfile:
25
+
26
+ ```ruby
27
+ gem 'LPP_T_02-Question'
28
+ ```
29
+
30
+ Luego ejecuta:
31
+
32
+ $ bundle
33
+
34
+ O instalala por tí mismo con:
35
+
36
+ $ gem install LPP_T_02-Question
37
+
38
+ ## Uso
39
+
40
+ Puedes usar esta gema para crear tus examenes de tipo test de una forma mas rápida y cómoda.
41
+
42
+ ## Contributing
43
+
44
+ 1. Fork it ( https://github.com/[my-github-username]/LPP_T_02-Question/fork )
45
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
46
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
47
+ 4. Push to the branch (`git push origin my-new-feature`)
48
+ 5. Create a new Pull Request
data/README.rdoc ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,24 @@
1
+ require "bundler/gem_tasks"
2
+ require "rdoc/task"
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new
6
+ task :default => :spec
7
+
8
+
9
+ Rake::RDocTask.new(:rdoc_dev) do |rd|
10
+ rd.main = "README.doc"
11
+ rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
12
+ rd.options << "--all"
13
+ end
14
+
15
+ desc "Ejecutar pruebas spec y volcar el resultado en un fichero html"
16
+ task :html do
17
+ sh "rspec -I. -Ilib -Ilib/Exam -Ispec spec/Exam_spec.rb --format html > doc/test/index.html"
18
+ sh "firefox doc/test/index.html"
19
+ end
20
+
21
+ desc "Ejecutar pruebas spec y volcar el resultado en un fichero de texto"
22
+ task :doc do
23
+ sh "rspec -I. -Ilib -Ilib/Exam -Ispec spec/Exam_spec.rb --format documentation"
24
+ end
data/doc/prct10.pdf ADDED
Binary file
data/doc/prct11.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,467 @@
1
+ [Coveralls] Set up the SimpleCov formatter.
2
+ [Coveralls] Using SimpleCov's default settings.
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">&#160;</p>
278
+ <p id="duration">&#160;</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">Exam</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">Exam</dt>
292
+ <script type="text/javascript">moveProgressBar('2.2');</script>
293
+ <dd class="example passed"><span class="passed_spec_name">~El método debe poder comparar una o más respuetas</span><span class='duration'>0.00015s</span></dd>
294
+ <script type="text/javascript">moveProgressBar('4.4');</script>
295
+ <dd class="example passed"><span class="passed_spec_name">~Debe tener un método para comprobar si las respuestas dadas por el usuario son correctas</span><span class='duration'>0.00074s</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 del tipo examen</span><span class='duration'>0.00008s</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">Exam</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">List</dt>
308
+ <script type="text/javascript">moveProgressBar('8.8');</script>
309
+ <dd class="example passed"><span class="passed_spec_name">#Debe poder contar las repeticiones de un mismo nodo</span><span class='duration'>0.00008s</span></dd>
310
+ <script type="text/javascript">moveProgressBar('11.1');</script>
311
+ <dd class="example passed"><span class="passed_spec_name">#Debe poder usar any?</span><span class='duration'>0.00054s</span></dd>
312
+ <script type="text/javascript">moveProgressBar('13.3');</script>
313
+ <dd class="example passed"><span class="passed_spec_name">#Se pueden insertar varios elementos</span><span class='duration'>0.00009s</span></dd>
314
+ <script type="text/javascript">moveProgressBar('15.5');</script>
315
+ <dd class="example passed"><span class="passed_spec_name">#Debe mostrarse correctamente</span><span class='duration'>0.00057s</span></dd>
316
+ <script type="text/javascript">moveProgressBar('17.7');</script>
317
+ <dd class="example passed"><span class="passed_spec_name">#Debe poder ordenarse</span><span class='duration'>0.00009s</span></dd>
318
+ <script type="text/javascript">moveProgressBar('20.0');</script>
319
+ <dd class="example passed"><span class="passed_spec_name">#Debe conocer el nodo de mayor dificultad</span><span class='duration'>0.00009s</span></dd>
320
+ <script type="text/javascript">moveProgressBar('22.2');</script>
321
+ <dd class="example passed"><span class="passed_spec_name">#Se extrae el primer elemento de la lista</span><span class='duration'>0.00009s</span></dd>
322
+ <script type="text/javascript">makeRed('rspec-header');</script>
323
+ <script type="text/javascript">makeRed('div_group_4');</script>
324
+ <script type="text/javascript">makeRed('example_group_4');</script>
325
+ <script type="text/javascript">moveProgressBar('24.4');</script>
326
+ <dd class="example failed">
327
+ <span class="failed_spec_name">#Debe tener un método invert que sea privado</span>
328
+ <span class="duration">0.00019s</span>
329
+ <div class="failure" id="failure_1">
330
+ <div class="message"><pre>
331
+ expected: true
332
+ got: false
333
+
334
+ (compared using ==)
335
+ </pre></div>
336
+ <div class="backtrace"><pre>./spec/Exam_spec.rb:236:in `block (3 levels) in &lt;class:List&gt;&#39;</pre></div>
337
+ <pre class="ruby"><code><span class="linenum">234</span>
338
+ <span class="linenum">235</span> it <span class="string"><span class="delimiter">&quot;</span><span class="content">#Debe tener un método invert que sea privado</span><span class="delimiter">&quot;</span></span> <span class="keyword">do</span>
339
+ <span class="offending"><span class="linenum">236</span> expect(<span class="instance-variable">@l</span>.private_methods.include? <span class="symbol">:invert</span>).to eq(<span class="predefined-constant">true</span>)</span>
340
+ <span class="linenum">237</span> <span class="keyword">end</span>
341
+ <span class="linenum">238</span> </code></pre>
342
+ </div>
343
+ </dd>
344
+ <script type="text/javascript">moveProgressBar('26.6');</script>
345
+ <dd class="example failed">
346
+ <span class="failed_spec_name">#Debe tener un método inverter que se encargue de invertir la lista</span>
347
+ <span class="duration">0.00056s</span>
348
+ <div class="failure" id="failure_2">
349
+ <div class="message"><pre>expected #&lt;List:0x00000004041c18 @head=#&lt;struct Node value=#&lt;Question:0x00000004041d08 @qt=&quot;2+2=&quot;, @r1=4, @wrong=[2, 5, 8], @difficulty=1&gt;, next=nil, prev=nil&gt;, @tail=#&lt;struct Node value=#&lt;Question:0x00000004041d08 @qt=&quot;2+2=&quot;, @r1=4, @wrong=[2, 5, 8], @difficulty=1&gt;, next=nil, prev=nil&gt;&gt; to respond to :inverter</pre></div>
350
+ <div class="backtrace"><pre>./spec/Exam_spec.rb:232:in `block (3 levels) in &lt;class:List&gt;&#39;</pre></div>
351
+ <pre class="ruby"><code><span class="linenum">230</span>
352
+ <span class="linenum">231</span> it <span class="string"><span class="delimiter">&quot;</span><span class="content">#Debe tener un método inverter que se encargue de invertir la lista</span><span class="delimiter">&quot;</span></span> <span class="keyword">do</span>
353
+ <span class="offending"><span class="linenum">232</span> expect(<span class="instance-variable">@l</span>).to respond_to <span class="symbol">:inverter</span></span>
354
+ <span class="linenum">233</span> <span class="keyword">end</span>
355
+ <span class="linenum">234</span> </code></pre>
356
+ </div>
357
+ </dd>
358
+ <script type="text/javascript">moveProgressBar('28.8');</script>
359
+ <dd class="example passed"><span class="passed_spec_name">#Debe existir una Lista con su cabeza</span><span class='duration'>0.00013s</span></dd>
360
+ <script type="text/javascript">moveProgressBar('31.1');</script>
361
+ <dd class="example passed"><span class="passed_spec_name">#Se puede insertar un elemento</span><span class='duration'>0.00016s</span></dd>
362
+ <script type="text/javascript">moveProgressBar('33.3');</script>
363
+ <dd class="example passed"><span class="passed_spec_name">#Debe existir el modulo Enumerable</span><span class='duration'>0.00040s</span></dd>
364
+ <script type="text/javascript">moveProgressBar('35.5');</script>
365
+ <dd class="example passed"><span class="passed_spec_name">#Debe poder usarse all?</span><span class='duration'>0.00010s</span></dd>
366
+ <script type="text/javascript">moveProgressBar('37.7');</script>
367
+ <dd class="example passed"><span class="passed_spec_name">#Debe conocer el nodo de menor dificultad</span><span class='duration'>0.00008s</span></dd>
368
+ </dl>
369
+ </div>
370
+ <div id="div_group_5" class="example_group passed">
371
+ <dl style="margin-left: 15px;">
372
+ <dt id="example_group_5" class="passed">Node</dt>
373
+ <script type="text/javascript">moveProgressBar('40.0');</script>
374
+ <dd class="example passed"><span class="passed_spec_name">#Debe existir un Nodo de la lista con sus datos y su siguiente</span><span class='duration'>0.00007s</span></dd>
375
+ </dl>
376
+ </div>
377
+ <div id="div_group_6" class="example_group passed">
378
+ <dl style="margin-left: 0px;">
379
+ <dt id="example_group_6" class="passed">Exam</dt>
380
+ </dl>
381
+ </div>
382
+ <div id="div_group_7" class="example_group passed">
383
+ <dl style="margin-left: 15px;">
384
+ <dt id="example_group_7" class="passed">Exam</dt>
385
+ <script type="text/javascript">moveProgressBar('42.2');</script>
386
+ <dd class="example passed"><span class="passed_spec_name">-Debe tener un método que devuelva un array con las respuestas correctas</span><span class='duration'>0.00009s</span></dd>
387
+ <script type="text/javascript">moveProgressBar('44.4');</script>
388
+ <dd class="example passed"><span class="passed_spec_name">-Debe mostrarse correctamente el examen</span><span class='duration'>0.00012s</span></dd>
389
+ <script type="text/javascript">moveProgressBar('46.6');</script>
390
+ <dd class="example passed"><span class="passed_spec_name">-Se puede insertar uno o varios elementos</span><span class='duration'>0.00007s</span></dd>
391
+ <script type="text/javascript">moveProgressBar('48.8');</script>
392
+ <dd class="example passed"><span class="passed_spec_name">-Debe tener un método que gestione las respuesta correctas</span><span class='duration'>0.00008s</span></dd>
393
+ <script type="text/javascript">moveProgressBar('51.1');</script>
394
+ <dd class="example passed"><span class="passed_spec_name">-Debe mostrar por pantalla el examen</span><span class='duration'>0.00006s</span></dd>
395
+ <script type="text/javascript">moveProgressBar('53.3');</script>
396
+ <dd class="example passed"><span class="passed_spec_name">-Debe tener un atributo lista</span><span class='duration'>0.00006s</span></dd>
397
+ </dl>
398
+ </div>
399
+ <div id="div_group_8" class="example_group passed">
400
+ <dl style="margin-left: 0px;">
401
+ <dt id="example_group_8" class="passed">Exam</dt>
402
+ </dl>
403
+ </div>
404
+ <div id="div_group_9" class="example_group passed">
405
+ <dl style="margin-left: 15px;">
406
+ <dt id="example_group_9" class="passed">TrueOrFalse</dt>
407
+ <script type="text/javascript">moveProgressBar('55.5');</script>
408
+ <dd class="example passed"><span class="passed_spec_name">*Deben existir opciones de respuesta</span><span class='duration'>0.00008s</span></dd>
409
+ <script type="text/javascript">moveProgressBar('57.7');</script>
410
+ <dd class="example passed"><span class="passed_spec_name">*Se debe invocar a un método para obtener las opciones de respuesta</span><span class='duration'>0.00006s</span></dd>
411
+ <script type="text/javascript">moveProgressBar('60.0');</script>
412
+ <dd class="example passed"><span class="passed_spec_name">*Debe ser una instancia de la clase Question</span><span class='duration'>0.00005s</span></dd>
413
+ <script type="text/javascript">moveProgressBar('62.2');</script>
414
+ <dd class="example passed"><span class="passed_spec_name">*Debe permitir dar valor a la dificultad</span><span class='duration'>0.00008s</span></dd>
415
+ <script type="text/javascript">moveProgressBar('64.4');</script>
416
+ <dd class="example passed"><span class="passed_spec_name">*Se pueden comparar las preguntas</span><span class='duration'>0.00008s</span></dd>
417
+ <script type="text/javascript">moveProgressBar('66.6');</script>
418
+ <dd class="example passed"><span class="passed_spec_name">*Se debe invocar un método para obtener la pregunta</span><span class='duration'>0.00008s</span></dd>
419
+ <script type="text/javascript">moveProgressBar('68.8');</script>
420
+ <dd class="example passed"><span class="passed_spec_name">*Debe existir un grado de dificultad por defecto</span><span class='duration'>0.00005s</span></dd>
421
+ <script type="text/javascript">moveProgressBar('71.1');</script>
422
+ <dd class="example passed"><span class="passed_spec_name">*Debe existir una pregunta</span><span class='duration'>0.00006s</span></dd>
423
+ <script type="text/javascript">moveProgressBar('73.3');</script>
424
+ <dd class="example passed"><span class="passed_spec_name">*Se debe invocar un método para obtener la dificultad</span><span class='duration'>0.00008s</span></dd>
425
+ <script type="text/javascript">moveProgressBar('75.5');</script>
426
+ <dd class="example passed"><span class="passed_spec_name">*Debe existir el módulo Comparable</span><span class='duration'>0.00006s</span></dd>
427
+ <script type="text/javascript">moveProgressBar('77.7');</script>
428
+ <dd class="example passed"><span class="passed_spec_name">*Se deben mostrar por la pantalla la pregunta y las opciones</span><span class='duration'>0.00007s</span></dd>
429
+ </dl>
430
+ </div>
431
+ <div id="div_group_10" class="example_group passed">
432
+ <dl style="margin-left: 0px;">
433
+ <dt id="example_group_10" class="passed">Exam</dt>
434
+ </dl>
435
+ </div>
436
+ <div id="div_group_11" class="example_group passed">
437
+ <dl style="margin-left: 15px;">
438
+ <dt id="example_group_11" class="passed">Simple_Selection</dt>
439
+ <script type="text/javascript">moveProgressBar('80.0');</script>
440
+ <dd class="example passed"><span class="passed_spec_name">:Debe existir un grado de dificultad por defecto</span><span class='duration'>0.00006s</span></dd>
441
+ <script type="text/javascript">moveProgressBar('82.2');</script>
442
+ <dd class="example passed"><span class="passed_spec_name">:Se deben mostrar por la pantalla la pregunta y las opciones</span><span class='duration'>0.00007s</span></dd>
443
+ <script type="text/javascript">moveProgressBar('84.4');</script>
444
+ <dd class="example passed"><span class="passed_spec_name">:Debe existir una pregunta</span><span class='duration'>0.00005s</span></dd>
445
+ <script type="text/javascript">moveProgressBar('86.6');</script>
446
+ <dd class="example passed"><span class="passed_spec_name">:Se debe invocar un método para obtener la dificultad</span><span class='duration'>0.00007s</span></dd>
447
+ <script type="text/javascript">moveProgressBar('88.8');</script>
448
+ <dd class="example passed"><span class="passed_spec_name">:Debe existir el módulo Comparable</span><span class='duration'>0.00006s</span></dd>
449
+ <script type="text/javascript">moveProgressBar('91.1');</script>
450
+ <dd class="example passed"><span class="passed_spec_name">:Se debe invocar a un método para obtener las opciones de respuesta</span><span class='duration'>0.00006s</span></dd>
451
+ <script type="text/javascript">moveProgressBar('93.3');</script>
452
+ <dd class="example passed"><span class="passed_spec_name">:Debe permitir dar valor a la dificultad</span><span class='duration'>0.00006s</span></dd>
453
+ <script type="text/javascript">moveProgressBar('95.5');</script>
454
+ <dd class="example passed"><span class="passed_spec_name">:Deben existir opciones de respuesta</span><span class='duration'>0.00005s</span></dd>
455
+ <script type="text/javascript">moveProgressBar('97.7');</script>
456
+ <dd class="example passed"><span class="passed_spec_name">:Se debe invocar un método para obtener la pregunta</span><span class='duration'>0.00006s</span></dd>
457
+ <script type="text/javascript">moveProgressBar('100.0');</script>
458
+ <dd class="example passed"><span class="passed_spec_name">:Se pueden comparar las preguntas</span><span class='duration'>0.00009s</span></dd>
459
+ </dl>
460
+ </div>
461
+ <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.11454 seconds</strong>";</script>
462
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "45 examples, 2 failures";</script>
463
+ </div>
464
+ </div>
465
+ </body>
466
+ </html>
467
+ [Coveralls] Outside the Travis environment, not sending data.