Skip to content

GFM spec redesign

gitlab-qa-bot requested to merge github/fork/rspeicher/gfm_spec_cleanup into master

Should now be much clearer about what each spec is actually testing. For example, instead of testing stuff like link classes and titles in every single call as a side-effect of testing equality, we only test those things once, in their own specs.

As part of this, I ended up adding a StaticModel role that I then added to Commit, so instead of doing this:

link_to(commit.id, project_commit_path(project, id: commit.id))
Note.create(noteable_id: commit.id, noteable_type: "Commit", ...)

it lets us do this:

link_to(commit.id, project_commit_path(project, commit))
Note.create(noteable: commit, ...)

Merge request reports

Loading