mumuki-laboratory 7.6.2 → 7.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +193 -2
  3. data/Rakefile +3 -0
  4. data/app/assets/javascripts/mumuki_laboratory/application.js +0 -1
  5. data/app/assets/javascripts/mumuki_laboratory/application/assets-loader.js +1 -1
  6. data/app/assets/javascripts/mumuki_laboratory/application/bridge.js +36 -10
  7. data/app/assets/javascripts/mumuki_laboratory/application/button.js +90 -1
  8. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +1 -0
  9. data/app/assets/javascripts/mumuki_laboratory/application/custom-editor.js +46 -4
  10. data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +14 -13
  11. data/app/assets/javascripts/mumuki_laboratory/application/kids.js +73 -36
  12. data/app/assets/javascripts/mumuki_laboratory/application/progress.js +3 -0
  13. data/app/assets/javascripts/mumuki_laboratory/application/results-renderer.js +51 -0
  14. data/app/assets/javascripts/mumuki_laboratory/application/submission.js +184 -35
  15. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -0
  16. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +43 -5
  17. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +3 -3
  18. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +55 -0
  19. data/app/controllers/assets_controller.rb +2 -0
  20. data/app/controllers/concerns/with_authorization.rb +4 -0
  21. data/app/controllers/concerns/with_user_discussion_validation.rb +14 -0
  22. data/app/controllers/discussions_controller.rb +6 -14
  23. data/app/controllers/discussions_messages_controller.rb +10 -1
  24. data/app/controllers/exercise_solutions_controller.rb +4 -2
  25. data/app/helpers/application_helper.rb +9 -5
  26. data/app/helpers/discussions_helper.rb +37 -23
  27. data/app/helpers/exercise_input_helper.rb +1 -1
  28. data/app/helpers/icons_helper.rb +3 -3
  29. data/app/views/book_discussions/index.html.erb +3 -3
  30. data/app/views/discussions/_message.html.erb +20 -8
  31. data/app/views/discussions/index.html.erb +0 -1
  32. data/app/views/discussions/new.html.erb +33 -0
  33. data/app/views/discussions/show.html.erb +18 -46
  34. data/app/views/exercise_solutions/_contextualization_results_container.html.erb +1 -1
  35. data/app/views/exercise_solutions/_results_title.html.erb +2 -2
  36. data/app/views/exercises/_read_only.html.erb +33 -6
  37. data/app/views/layouts/_copyright.html.erb +1 -1
  38. data/app/views/layouts/_discussions.html.erb +21 -3
  39. data/app/views/layouts/_test_results.html.erb +1 -1
  40. data/app/views/layouts/exercise_inputs/editors/_custom.html.erb +1 -1
  41. data/app/views/layouts/exercise_inputs/forms/_kids_form.html.erb +1 -1
  42. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +1 -1
  43. data/app/views/layouts/exercise_inputs/layouts/_input_bottom.html.erb +1 -1
  44. data/app/views/layouts/exercise_inputs/layouts/_input_kindergarten.html.erb +40 -0
  45. data/app/views/layouts/exercise_inputs/layouts/{_input_kids.html.erb → _input_primary.html.erb} +1 -1
  46. data/app/views/layouts/exercise_inputs/layouts/_input_right.html.erb +1 -1
  47. data/app/views/layouts/modals/_kids_context.html.erb +1 -8
  48. data/app/views/user_mailer/1st_reminder.html.erb +1 -1
  49. data/app/views/user_mailer/1st_reminder.text.erb +1 -1
  50. data/app/views/user_mailer/2nd_reminder.html.erb +1 -1
  51. data/app/views/user_mailer/2nd_reminder.text.erb +1 -1
  52. data/app/views/user_mailer/3rd_reminder.html.erb +1 -1
  53. data/app/views/user_mailer/3rd_reminder.text.erb +1 -1
  54. data/app/views/user_mailer/no_submissions_reminder.html.erb +1 -1
  55. data/app/views/user_mailer/no_submissions_reminder.text.erb +1 -1
  56. data/config/routes.rb +2 -1
  57. data/lib/mumuki/laboratory/controllers/results_rendering.rb +1 -2
  58. data/lib/mumuki/laboratory/locales/en.yml +8 -2
  59. data/lib/mumuki/laboratory/locales/es-CL.yml +292 -0
  60. data/lib/mumuki/laboratory/locales/es.yml +7 -1
  61. data/lib/mumuki/laboratory/locales/pt.yml +8 -4
  62. data/lib/mumuki/laboratory/version.rb +1 -1
  63. data/spec/controllers/confirmations_controller_spec.rb +1 -1
  64. data/spec/controllers/discussions_messages_controller_spec.rb +73 -0
  65. data/spec/controllers/exercise_solutions_controller_spec.rb +41 -6
  66. data/spec/dummy/db/schema.rb +12 -1
  67. data/spec/features/discussion_flow_spec.rb +190 -0
  68. data/spec/features/exercise_flow_spec.rb +1 -1
  69. data/spec/features/menu_bar_spec.rb +88 -7
  70. data/spec/helpers/breadcrumbs_helper_spec.rb +1 -1
  71. data/spec/javascripts/bridge-spec.js +5 -0
  72. data/spec/javascripts/csrf-token-spec.js +7 -0
  73. data/spec/javascripts/elipsis-spec.js +25 -0
  74. data/spec/javascripts/results-renderers-spec.js +17 -0
  75. data/spec/javascripts/spec-helper.js +30 -0
  76. data/spec/javascripts/speech-bubble-renderer-spec.js +11 -0
  77. data/spec/javascripts/timeout-spec.js +5 -0
  78. data/spec/javascripts/timer-spec.js +5 -0
  79. data/spec/teaspoon_env.rb +187 -0
  80. metadata +34 -9
  81. data/app/views/layouts/modals/_new_discussion.html.erb +0 -27
  82. data/vendor/assets/javascripts/hotjar.js +0 -8
@@ -17,7 +17,7 @@ feature 'Exercise Flow', organization_workspace: :test do
17
17
  let(:playground_2) { build(:playground, name: 'Succ6', description: 'Description of Succ4', layout: :input_right, extra: 'x = 4') }
18
18
  let!(:reading) { build(:reading, name: 'Reading about Succ', description: 'Lets understand succ history') }
19
19
  let!(:exercise_not_in_path) { create :exercise }
20
- let(:kids_problem) { build(:problem, name: 'Kids prob', description: 'Description of kids prob', layout: :input_kids, hint: 'lele', language: gobstones) }
20
+ let(:kids_problem) { build(:problem, name: 'Kids prob', description: 'Description of kids prob', layout: :input_primary, hint: 'lele', language: gobstones) }
21
21
 
22
22
  let!(:chapter) {
23
23
  create(:chapter, name: 'Functional Programming', lessons: [
@@ -1,7 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  feature 'menu bar' do
4
- let(:chapter) { create(:chapter, lessons: [create(:lesson)]) }
4
+ let(:lesson) { create(:lesson, exercises: create_list(:exercise, 3))}
5
+ let(:chapter) { create(:chapter, lessons: [lesson]) }
5
6
  let(:book) { create(:book, chapters: [chapter], name: 'private', slug: 'mumuki/mumuki-the-private-book') }
6
7
  let(:private_organization) { create(:organization, name: 'private', book: book) }
7
8
 
@@ -32,6 +33,8 @@ feature 'menu bar' do
32
33
  expect(page).not_to have_text('Profile')
33
34
  expect(page).not_to have_text('Classroom')
34
35
  expect(page).not_to have_text('Bibliotheca')
36
+ expect(page).not_to have_text('Solve other\'s doubts')
37
+ expect(page).not_to have_text('My doubts')
35
38
  end
36
39
  end
37
40
  end
@@ -52,15 +55,91 @@ feature 'menu bar' do
52
55
  expect(page).to have_text('Profile')
53
56
  expect(page).not_to have_text('Classroom')
54
57
  expect(page).not_to have_text('Bibliotheca')
58
+ expect(page).not_to have_text('Solve other\'s doubts')
59
+ expect(page).not_to have_text('My doubts')
55
60
  end
56
61
 
57
- scenario 'student should only see profile' do
58
- set_current_user! visitor
62
+ context 'student with no discussions should' do
63
+ scenario 'only see profile if forum is not enabled' do
64
+ set_current_user! student
59
65
 
60
- visit '/'
61
- expect(page).to have_text('Profile')
62
- expect(page).not_to have_text('Classroom')
63
- expect(page).not_to have_text('Bibliotheca')
66
+ visit '/'
67
+ expect(page).to have_text('Profile')
68
+ expect(page).not_to have_text('Classroom')
69
+ expect(page).not_to have_text('Bibliotheca')
70
+ expect(page).not_to have_text('Solve other\'s doubts')
71
+ expect(page).not_to have_text('My doubts')
72
+ end
73
+
74
+ scenario 'see profile and solve_other_doubts links if forum is enabled' do
75
+ set_current_user! student
76
+ private_organization.update! forum_enabled: true
77
+
78
+ visit '/'
79
+ expect(page).to have_text('Profile')
80
+ expect(page).not_to have_text('Classroom')
81
+ expect(page).not_to have_text('Bibliotheca')
82
+ expect(page).to have_text('Solve other\'s doubts')
83
+ expect(page).not_to have_text('My doubts')
84
+ end
85
+ end
86
+
87
+ context 'student with discussions should' do
88
+ let(:discussion) { create(:discussion, item: lesson.exercises.last, initiator: student)}
89
+
90
+ scenario 'only see profile if forum is not enabled' do
91
+ set_current_user! student
92
+ student.subscribe_to! discussion
93
+
94
+ visit '/'
95
+ expect(page).to have_text('Profile')
96
+ expect(page).not_to have_text('Classroom')
97
+ expect(page).not_to have_text('Bibliotheca')
98
+ expect(page).not_to have_text('Solve other\'s doubts')
99
+ expect(page).not_to have_text('My doubts')
100
+ end
101
+
102
+ scenario 'see all discussions links if forum is enabled' do
103
+ set_current_user! student
104
+ private_organization.update! forum_enabled: true
105
+ student.subscribe_to! discussion
106
+
107
+ visit '/'
108
+ expect(page).to have_text('Profile')
109
+ expect(page).not_to have_text('Classroom')
110
+ expect(page).not_to have_text('Bibliotheca')
111
+ expect(page).to have_text('Solve other\'s doubts')
112
+ expect(page).to have_text('My doubts')
113
+ end
114
+
115
+ scenario 'only see profile if forum is enabled in a forum_only_for_trusted organization' do
116
+ set_current_user! student
117
+ student.subscribe_to! discussion
118
+ private_organization.update! forum_enabled: true
119
+ private_organization.update! forum_only_for_trusted: true
120
+
121
+ visit '/'
122
+ expect(page).to have_text('Profile')
123
+ expect(page).not_to have_text('Classroom')
124
+ expect(page).not_to have_text('Bibliotheca')
125
+ expect(page).not_to have_text('Solve other\'s doubts')
126
+ expect(page).not_to have_text('My doubts')
127
+ end
128
+
129
+ scenario 'see all discussions links if forum is enabled in a forum_only_for_trusted organization but it is trusted' do
130
+ student.update! trusted_for_forum: true
131
+ set_current_user! student
132
+ student.subscribe_to! discussion
133
+ private_organization.update! forum_enabled: true
134
+ private_organization.update! forum_only_for_trusted: true
135
+
136
+ visit '/'
137
+ expect(page).to have_text('Profile')
138
+ expect(page).not_to have_text('Classroom')
139
+ expect(page).not_to have_text('Bibliotheca')
140
+ expect(page).to have_text('Solve other\'s doubts')
141
+ expect(page).to have_text('My doubts')
142
+ end
64
143
  end
65
144
 
66
145
  scenario 'teacher should see profile and classroom' do
@@ -71,6 +150,8 @@ feature 'menu bar' do
71
150
  expect(page).to have_text('Profile')
72
151
  expect(page).to have_text('Classroom')
73
152
  expect(page).not_to have_text('Bibliotheca')
153
+ expect(page).not_to have_text('Solve other\'s doubts')
154
+ expect(page).not_to have_text('My doubts')
74
155
  end
75
156
 
76
157
  scenario 'writer should see profile and bibliotheca' do
@@ -91,7 +91,7 @@ describe BreadcrumbsHelper, organization_workspace: :test do
91
91
  expect(breadcrumb).to include('my lesson')
92
92
  expect(breadcrumb).to include('my exercise')
93
93
  expect(breadcrumb).to include('discussions')
94
- expect(breadcrumb).to include(discussion.title)
94
+ expect(breadcrumb).to include(discussion.item.navigable_name)
95
95
  expect(breadcrumb).to be_html_safe
96
96
  end
97
97
  end
@@ -0,0 +1,5 @@
1
+ describe('bridge', () => {
2
+ it('can create bridge', () => {
3
+ expect(new mumuki.bridge.Laboratory()).not.toBe(null);
4
+ })
5
+ })
@@ -0,0 +1,7 @@
1
+ describe('csrf token', () => {
2
+ it('can create token', () => {
3
+ expect(new mumuki.CsrfToken()).not.toBe(null);
4
+ })
5
+ })
6
+
7
+
@@ -0,0 +1,25 @@
1
+ describe('elipsis', () => {
2
+ it('does nothing when no elipsis', () => {
3
+ expect(mumuki.elipsis('hello')).toEqual('hello');
4
+ })
5
+
6
+ it('replaces student elipsis', () => {
7
+ expect(mumuki.elipsis(`function longitud(unString) {
8
+ /*<elipsis-for-student@*/
9
+ return unString.length;
10
+ /*@elipsis-for-student>*/
11
+ }`)).toEqual(`function longitud(unString) {
12
+ /* ... */
13
+ }`)
14
+ });
15
+
16
+ it('replaces student hidden', () => {
17
+ expect(mumuki.elipsis(`function longitud(unString) {
18
+ /*<hidden-for-student@*/
19
+ return unString.length;
20
+ /*@hidden-for-student>*/
21
+ }`)).toEqual(`function longitud(unString) {
22
+ /**/
23
+ }`)
24
+ });
25
+ })
@@ -0,0 +1,17 @@
1
+ describe('results renderers', () => {
2
+ it('can compute class for status', () => {
3
+ expect(mumuki.renderers.classForStatus('passed')).toEqual('success');
4
+ })
5
+
6
+ it('can compute icon for status', () => {
7
+ expect(mumuki.renderers.iconForStatus('pending')).toEqual('fa-circle');
8
+ })
9
+
10
+ it('can compute progress list item for status', () => {
11
+ expect(mumuki.renderers.progressListItemClassForStatus('passed_with_warnings')).toEqual('progress-list-item text-center warning ');
12
+ })
13
+
14
+ it('can compute progress list item for status when active', () => {
15
+ expect(mumuki.renderers.progressListItemClassForStatus('failed', true)).toEqual('progress-list-item text-center danger active');
16
+ })
17
+ })
@@ -0,0 +1,30 @@
1
+ // Teaspoon includes some support files, but you can use anything from your own support path too.
2
+ // require support/jasmine-jquery-1.7.0
3
+ // require support/jasmine-jquery-2.0.0
4
+ // require support/jasmine-jquery-2.1.0
5
+ // require support/sinon
6
+ //
7
+ // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
8
+ // Use this polyfill to avoid the confusion.
9
+ //
10
+ // You can require your own javascript files here. By default this will include everything in application, however you
11
+ // may get better load performance if you require the specific files that are being used in the spec that tests them.
12
+ //=require mumuki_laboratory/application
13
+ //
14
+ // Deferring execution
15
+ // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
16
+ // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
17
+ //
18
+ // Teaspoon.defer = true
19
+ // setTimeout(Teaspoon.execute, 1000)
20
+ //
21
+ // Matching files
22
+ // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
23
+ // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
24
+ // configuration in teaspoon_env.rb
25
+ //
26
+ // Manifest
27
+ // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
28
+ // the configuration and use this file as a manifest.
29
+ //
30
+ // For more information: http://github.com/modeset/teaspoon
@@ -0,0 +1,11 @@
1
+ describe('results renderers', () => {
2
+ it('can render result item', () => {
3
+ expect(mumuki.renderers.renderSpeechBubbleResultItem('fix that')).toEqual(`
4
+ <div class="results-item">
5
+ <ul class="results-list">
6
+ <li>fix that</li>
7
+ </ul>
8
+ </div>`);
9
+ })
10
+
11
+ })
@@ -0,0 +1,5 @@
1
+ describe('setTimeout', () => {
2
+ it('can create setTimeout', () => {
3
+ expect(mumuki.setTimeout).not.toBe(null);
4
+ })
5
+ })
@@ -0,0 +1,5 @@
1
+ describe('timer', () => {
2
+ it('can create timer', () => {
3
+ expect(mumuki.startTimer).not.toBe(null);
4
+ })
5
+ })
@@ -0,0 +1,187 @@
1
+ unless defined?(Rails)
2
+ ENV["RAILS_ROOT"] = File.expand_path("../dummy", __FILE__)
3
+ require File.expand_path("../dummy/config/environment", __FILE__)
4
+ end
5
+
6
+
7
+ Teaspoon.configure do |config|
8
+ # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
9
+ # `http://localhost:3000/jasmine` to run your tests.
10
+ config.mount_at = "/teaspoon"
11
+
12
+ # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
13
+ # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
14
+ # Note: Defaults to `Rails.root` if nil.
15
+ config.root = Mumuki::Laboratory::Engine.root
16
+
17
+ # Paths that will be appended to the Rails assets paths
18
+ # Note: Relative to `config.root`.
19
+ config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
20
+
21
+ # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
22
+ # be rendered as fixtures.
23
+ config.fixture_paths = ["spec/javascripts/fixtures"]
24
+
25
+ # SUITES
26
+ #
27
+ # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
28
+ #
29
+ # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
30
+ # omit various directives and the ones defined in the default suite will be used.
31
+ #
32
+ # To run a specific suite
33
+ # - in the browser: http://localhost/teaspoon/[suite_name]
34
+ # - with the rake task: rake teaspoon suite=[suite_name]
35
+ # - with the cli: teaspoon --suite=[suite_name]
36
+ config.suite do |suite|
37
+ # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
38
+ # you -- which you can override with the directives below. This should be specified first, as it can override other
39
+ # directives.
40
+ # Note: If no version is specified, the latest is assumed.
41
+ #
42
+ # Versions: 1.3.1, 2.0.3, 2.1.3, 2.2.0, 2.2.1, 2.3.4
43
+ suite.use_framework :jasmine, "2.3.4"
44
+
45
+ # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
46
+ # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
47
+ suite.matcher = "{spec/javascripts,app/assets}/**/*-spec.{js,js.coffee,coffee}"
48
+
49
+ # Load additional JS files, but requiring them in your spec helper is the preferred way to do this.
50
+ #suite.javascripts = []
51
+
52
+ # You can include your own stylesheets if you want to change how Teaspoon looks.
53
+ # Note: Spec related CSS can and should be loaded using fixtures.
54
+ #suite.stylesheets = ["teaspoon"]
55
+
56
+ # This suites spec helper, which can require additional support files. This file is loaded before any of your test
57
+ # files are loaded.
58
+ suite.helper = "spec-helper"
59
+
60
+ # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
61
+ # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
62
+ #
63
+ # Available: boot, boot_require_js
64
+ suite.boot_partial = "boot"
65
+
66
+ # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
67
+ suite.body_partial = "body"
68
+
69
+ # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
70
+ # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
71
+ #suite.hook :fixtures, &proc{}
72
+
73
+ # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
74
+ # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
75
+ # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
76
+ #suite.expand_assets = true
77
+
78
+ # Non-.js file extensions Teaspoon should consider JavaScript files
79
+ #suite.js_extensions = [/(\.js)?.coffee/, /(\.js)?.es6/, ".es6.js"]
80
+ end
81
+
82
+ # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
83
+ # be run in the default suite -- but can be focused into a more specific suite.
84
+ #config.suite :targeted do |suite|
85
+ # suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
86
+ #end
87
+
88
+ # CONSOLE RUNNER SPECIFIC
89
+ #
90
+ # These configuration directives are applicable only when running via the rake task or command line interface. These
91
+ # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
92
+ # task.
93
+ #
94
+ # Command Line Interface:
95
+ # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
96
+ #
97
+ # Rake:
98
+ # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
99
+
100
+ # Specify which headless driver to use. Supports PhantomJS, Selenium Webdriver and BrowserStack Webdriver.
101
+ #
102
+ # Available: :phantomjs, :selenium, :browserstack, :capybara_webkit
103
+ # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
104
+ # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
105
+ # BrowserStack Webdriver: https://github.com/modeset/teaspoon/wiki/Using-BrowserStack-WebDriver
106
+ # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
107
+ # config.driver = :capybara_webkit
108
+ config.driver = :selenium
109
+ config.driver_options = {client_driver: :firefox}
110
+
111
+
112
+ # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
113
+ # considered a failure. This is to avoid issues that can arise where tests stall.
114
+ #config.driver_timeout = 180
115
+
116
+ # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
117
+ #config.server = nil
118
+
119
+ # Specify a host to run on a specific host, otherwise Teaspoon will use 127.0.0.1.
120
+ #config.server_host = nil
121
+
122
+ # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
123
+ #config.server_port = nil
124
+
125
+ # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
126
+ # want to lower this if you know it shouldn't take long to start.
127
+ #config.server_timeout = 20
128
+
129
+ # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
130
+ # several suites, but in environments like CI this may not be desirable.
131
+ #config.fail_fast = true
132
+
133
+ # Specify the formatters to use when outputting the results.
134
+ # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
135
+ #
136
+ # Available: :dot, :clean, :documentation, :json, :junit, :pride, :rspec_html, :snowday, :swayze_or_oprah, :tap, :tap_y, :teamcity
137
+ config.formatters = [:documentation]
138
+
139
+ # Specify if you want color output from the formatters.
140
+ #config.color = true
141
+
142
+ # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
143
+ # remove them, but in verbose applications this may not be desirable.
144
+ #config.suppress_log = false
145
+
146
+ # COVERAGE REPORTS / THRESHOLD ASSERTIONS
147
+ #
148
+ # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
149
+ # display coverage statistics.
150
+ #
151
+ # Coverage configurations are similar to suites. You can define several, and use different ones under different
152
+ # conditions.
153
+ #
154
+ # To run with a specific coverage configuration
155
+ # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
156
+ # - with the cli: teaspoon --coverage=[coverage_name]
157
+
158
+ # Specify that you always want a coverage configuration to be used. Otherwise, specify that you want coverage
159
+ # on the CLI.
160
+ # Set this to "true" or the name of your coverage config.
161
+ #config.use_coverage = nil
162
+
163
+ # You can have multiple coverage configs by passing a name to config.coverage.
164
+ # e.g. config.coverage :ci do |coverage|
165
+ # The default coverage config name is :default.
166
+ config.coverage do |coverage|
167
+ # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
168
+ #
169
+ # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
170
+ #coverage.reports = ["text-summary", "html"]
171
+
172
+ # The path that the coverage should be written to - when there's an artifact to write to disk.
173
+ # Note: Relative to `config.root`.
174
+ #coverage.output_path = "coverage"
175
+
176
+ # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
177
+ # default excludes assets from vendor, gems and support libraries.
178
+ #coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
179
+
180
+ # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
181
+ # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
182
+ #coverage.statements = nil
183
+ #coverage.functions = nil
184
+ #coverage.branches = nil
185
+ #coverage.lines = nil
186
+ end
187
+ end