gitlab-org--gitlab-foss/lib
Rémy Coutable 2672f44e25 Merge branch 'clean-up-issue_spec.js' into 'master'
Replace static fixture by generated one in issue_spec.js

## What does this MR do?

- clean up `issue_spec.js`
- introduce an alternative approach to #19445
  - rename `rake teaspoon` to `rake teaspoon:tests`
  - introduce `rake teaspoon:fixtures` which generates fixtures using RSpec
  - introduce `rake teaspoon` which runs `rake teaspoon:fixtures` and `rake teaspoon:tests`

## Why was this MR needed?

- many duplications
- missing existence checks
- missing conditions
- static fixtures don't match real views

## Reasoning

I want to explain some of my decisions here, so that they stay visible for future discussions.

### Why not HAML?

- same number of HAML templates as number of fixtures (many input files)
- embedded logic less readable
- can not be rendered by JavaScript (because of inline Ruby)

### Why RSpec?

- real controllers for fixtures
- spys available for mocking
- easily report failed fixture generations

### Why not magic_lamp? (#19445)

- introduces another dependency/tool
- needs to run a server concurrently to teaspoon
- makes it harder to use a JavaScript test runner
- static HTML files serve faster

See merge request !6059
2016-10-28 13:37:19 +00:00
..
api API: Fix booleans not recognized as such when using the `to_boolean` helper 2016-10-27 18:21:09 +02:00
assets
backup Backups do not fail anymore when using tar on annex and custom_hooks 2016-10-27 11:24:35 +01:00
banzai Escape ref and path for relative links (!6050) 2016-10-24 22:18:34 +02:00
ci Add logical validation to gitlab-ci.yml 2016-10-18 12:22:51 +02:00
constraints Add relative url support to routing contrainers 2016-10-24 13:51:17 +03:00
container_registry
gitlab Fix typos 2016-10-28 11:30:20 +02:00
json_web_token
omni_auth
rouge/formatters
support
tasks Replace static issue fixtures by script (!6059) 2016-10-28 14:02:17 +02:00
banzai.rb Add markdown cache columns to the database, but don't use them yet 2016-10-07 02:54:25 +01:00
disable_email_interceptor.rb
event_filter.rb Differentiate the expire from leave event 2016-10-20 00:26:45 +00:00
expand_variables.rb
extracts_path.rb Improve ExtractsPath logic related to atom format 2016-10-15 01:36:05 +03:00
file_size_validator.rb
file_streamer.rb
gitlab.rb
gt_one_coercion.rb
repository_cache.rb
static_model.rb
unfold_form.rb
uploaded_file.rb
version_check.rb