summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Pass commit data to ProcessCommitWorkerprocess-commit-worker-improvementsYorick Peterse2016-12-011-0/+4
| | | | | | | | | | | By passing commit data to this worker we remove the need for querying the Git repository for every job. This in turn reduces the time spent processing each job. The migration included migrates jobs from the old format to the new format. For this to work properly it requires downtime as otherwise workers may start producing errors until they're using a newer version of the worker code.
* Only include EmailHelpers in mailer specs and specs using themrs-include-emailhelpersRobert Speicher2016-12-011-1/+1
|
* Refine specs for build show page with environmentsGrzegorz Bizon2016-11-091-3/+4
|
* Fix broken commits search24255-search-fixValery Sizov2016-11-081-0/+1
|
* Replace static issue fixtures by script (!6059)winniehell2016-10-281-1/+1
|
* Don't schedule ProjectCacheWorker unless neededproject-cache-worker-schedulingYorick Peterse2016-10-251-0/+6
| | | | | | This changes ProjectCacheWorker.perform_async so it only schedules a job when no lease for the given project is present. This ensures we don't end up scheduling hundreds of jobs when they won't be executed anyway.
* Revert "Merge branch 'tests-use-tmpfs' into 'master'"Yorick Peterse2016-10-121-5/+0
| | | This reverts merge request !6730
* Try tmpfs for repository storage, etcNick Thomas2016-10-061-0/+5
|
* Upgrade Devise from 4.1.1 to 4.2.0.Connor Shea2016-09-271-1/+1
| | | | | | | | This fixes an issue with Rails 5 and brings us up-to-date with the latest Devise release. This also replaces the deprecated Devise::TestHelpers with Devise::Test::ControllerHelpers. Changelog: https://github.com/plataformatec/devise/blob/v4.2.0/CHANGELOG.md#420---2016-07-01
* Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-08-241-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | artifacts-from-ref-and-build-name * upstream/master: (192 commits) Added CHANGELOG Added unfold test to parallel and added 'diff discussion' context Fix Spinach branches spec Better first match on this MR also Change merge_error column from string to text type Fix typo in gitlab_flow.md entities: make Environment inherit EnvironmentBasic Updated to optimized specs from !5864 Added 'with an unfolded line should not allow commenting' scenario (line 125) Added addtional 'renderable' validator to check 'data-note-type' attr exists Allow passing an index to selectRowAtIndex Fixed enter key in search input not working Fix file links on project page Files view Fix incorrect "stopped impersonation" log message 8.11 is released, long live 8.12 Also check if Akismet is enabled, before showing the `Submit as spam` button. fix location of markdown help location Fix for update 8.10-to-8.11.md doc. Appease the linter. Add Ruby 2.3 upgrade notes. ...
| * Use travel_to instead of dependency injection, feedback:Lin Jen-Shin2016-08-191-0/+1
| | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5734#note_14056642
* | Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-08-101-4/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | artifacts-from-ref-and-build-name * upstream/master: (516 commits) Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense Clarify the features for generating default label sets Update tree view to sort folders with submodules Memoize CI config node validator to prevent leaks fix MR source project assignment remove offending empty line Rails prefers require_dependency so that it won't require twice: use Unix line endings for API documentation use long options for curl examples in API documentation (!5703) Prefixes removed branches name with PR number when importing PR from GH Update CHANGELOG Remove SHA suffix for removed branches name when importing PR from GH add linting script for documentation ...
| * Add a method in Project to return a cached value of total count of projectsStan Hu2016-08-091-0/+7
| | | | | | | | | | This is in preparation to address the DB load caused by the counting in gitlab-com/infrastructure#303.
| * Introduce SimpleCovEnv singleton helper and use itGrzegorz Bizon2016-07-211-2/+2
| |
| * Update configuration of SimpleCovKamil Trzcinski2016-07-211-0/+1
| |
| * Store all simplecov configuration in one fileKamil Trzcinski2016-07-211-11/+1
| |
| * Remove unused simplecov-rcovKamil Trzcinski2016-07-211-1/+0
| |
| * Merge coverage reportKamil Trzcinski2016-07-211-1/+9
| |
* | Merge branch 'master' into artifacts-from-ref-and-build-nameLin Jen-Shin2016-07-181-1/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (335 commits) Disable transaction when adding index for Ci::Pipeline added changelog allow empty repos on import/export Modify test for Build tabs Add tests to project builds for pending tab Remove unused .js-running-count class Add test for new pending tab and update tests for running tab Add Pending Tab to Admin Builds added changelog limit project expor retry to only 3 use method in validates statement Fix spec to set import_url before attempting to create import_data Allow a project import URL to be blank to prevent false positives preventing settings from being saved Refactor gitlab_ci_yaml_processor variables tests Fix CI yaml example Align cancel and retry buttons Remove deploy to production button Remove irrelevant comments Fix gitlab_ci_yaml_processor_spec.rb Fix AddWhenAndYamlVariablesToCiBuilds migration ...
| * We're not using them (and look at the typo)remove-unused-helperLin Jen-Shin2016-07-121-1/+0
| |
* | Add all the tests and fix stuffs along the way:Lin Jen-Shin2016-07-121-3/+3
|/ | | | | | | | | | | | | It turns out they are different: builds.success.latest.first and builds.latest.success.first If we put success first, that latest would also filter via success, and which is what we want here.
* Remove coveralls linescleanup-forgotten-linesZ.J. van de Weg2016-06-301-5/+0
|
* Enable Knapsack only in CI environmentknapsack-env-ciKamil Trzcinski2016-06-081-2/+4
|
* Remove knapsack_merger since we don't use it anywayKamil Trzcinski2016-06-071-1/+0
|
* Use knapsack everywhereKamil Trzcinski2016-06-031-1/+1
|
* Use own version of knapsack which supports spinach testsKamil Trzcinski2016-06-031-1/+1
|
* Try to use knapsackKamil Trzcinski2016-06-031-0/+4
|
* Update rspec-rails from 3.3.3 to 3.4.2.Connor Shea2016-05-011-6/+0
| | | | | | | | This allows the removal of the monkey patch from this commit: 47ff1c56089b3df9c36b77c02f0f3db54fea1d54 It'll also make it slightly easier to upgrade to 3.5.0 later. Changelog: https://github.com/rspec/rspec-rails/blob/master/Changelog.md#340--2015-11-11
* Original implementation to allow users to subscribe to labelsTimothy Andrew2016-03-151-0/+1
| | | | | | | | | | | | | | | | | | 1. Allow subscribing (the current user) to a label - Refactor the `Subscription` coffeescript class - The main change is that it accepts a container, and conducts all DOM queries within its scope. We need this because the labels page has multiple instances of `Subscription` on the same page. 2. Creating an issue or MR with labels notifies users subscribed to those labels - Label `has_many` subscribers through subscriptions. 3. Adding a label to an issue or MR notifies users subscribed to those labels - This only applies to subscribers of the label that has just been added, not all labels for the issue.
* Removed benchmark suite and its documentationremove-benchmark-suiteYorick Peterse2016-03-101-2/+0
| | | | | | | | | The rationale for this can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/13718 but in short the benchmark suite no longer serves a good purpose now that we have proper production monitoring in place. Fixes gitlab-org/gitlab-ce#13718
* Retry failed testsKamil Trzcinski2016-03-091-0/+4
|
* Add temporary monkey patch to get specs passing on 4.2.5.1Robert Speicher2016-01-251-0/+6
|
* fix notification_service specsValery Sizov2015-11-301-0/+1
|
* Merge branch 'refactor-build-service' into 'master' Kamil Trzciński2015-10-051-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor Ci::Commit and Ci::Build to have all builds for same :sha on single page This makes Ci::Commit to have only :sha and simplifies routing to have only :sha in path. The :ref and :push_data is now parameter of Ci::Build. All commit related data (git author, message and .gitlab-ci.yml) is read directly from repository. All code related for creating builds is moved to CreateBuildsService. Status deduction is rewritten to make if more efficient and easier to integrate with Commit Status API. This is partially working, tests are not yet touched. This slightly changes view of Commit: ![Screen_Shot_2015-10-02_at_15.21.47](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ad3f1ccdcc87659ea437d8db6c5b9f94/Screen_Shot_2015-10-02_at_15.21.47.png) @dzaporozhets What do you think? See merge request !1502
| * Make commit_spec runKamil Trzcinski2015-10-051-0/+4
| |
* | Basic setup for an RSpec based benchmark suitebenchmark-suiteYorick Peterse2015-10-021-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This benchmark suite uses benchmark-ips (https://github.com/evanphx/benchmark-ips) behind the scenes. Specs can be turned into benchmark specs by setting "benchmark" to "true" in the top-level describe block like so: describe SomeClass, benchmark: true do end Writing benchmarks can be done using custom RSpec matchers, for example: describe MaruTheCat, benchmark: true do describe '#jump_in_box' do it 'should run 1000 iterations per second' do maru = described_class.new expect { maru.jump_in_box }.to iterate_per_second(1000) end end end By default the "iterate_per_second" expectation requires a standard deviation under 30% (this is just an arbitrary default for now). You can change this by chaining "with_maximum_stddev" on the expectation: expect { maru.jump_in_box }.to iterate_per_second(1000) .with_maximum_stddev(10) This will change the expectation to require a maximum deviation of 10%. Alternatively you can use the it block style to write specs: describe MaruTheCat, benchmark: true do describe '#jump_in_box' do subject { -> { described_class.new } } it { is_expected.to iterate_per_second(1000) } end end Because "iterate_per_second" operates on a block, opposed to a static value, the "subject" method must return a Proc. This looks a bit goofy but I have been unable to find a nice way around this.
* Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-gDmitriy Zaporozhets2015-09-111-0/+1
|\ | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Fix emoji URLs in Markdown when relative_url_root is usedStan Hu2015-09-061-0/+1
| | | | | | | | | | | | | | | | Also adds the ability to run rspecs with relative_url_defined on the enviornment. For example: RELATIVE_URL_ROOT=/gitlab rspec Closes #1728
* | Merge CI factories and CI spec/support with GitLabDmitriy Zaporozhets2015-09-091-0/+3
|/
* Move coverage-related setup back to spec_helperrs-fix-coverageRobert Speicher2015-07-131-0/+11
| | | | These tools must be loaded before our regular Rails environment.
* Fix ApplicationHelper specsrs-fix-application-helper-specsRobert Speicher2015-06-301-0/+1
| | | | | | | | There were several specs that were failing when run by themselves. - Use the `helper` object, as per RSpec 3 standards - Use `assign` to assign instance variables that helpers expect - Add `StubConfiguration` support module
* Add spec/support/factory_girlRobert Speicher2015-06-301-4/+3
| | | | | Just for consistency with our Capybara, DatabaseCleaner, WebMock, etc. setups.
* Update email_spec gemRobert Speicher2015-06-221-1/+0
| | | | | | This fixes spec/mailers/notify_spec Also only require email_spec in the one place it's used
* Fix shoulda-matchers requireRobert Speicher2015-06-101-0/+1
|
* Add spec/support files for WebMock and test coverageRobert Speicher2015-06-101-12/+0
|
* Move RSpec setup for Capybara to its own support fileRobert Speicher2015-04-251-7/+1
|
* Add ActiveRecord::Migration.maintain_test_schema! to spec_helperRobert Speicher2015-03-271-0/+2
| | | | | New in Rails 4.1, this eliminates spec failures due to forgetting to run `db:test:prepare`.
* Updated rspec to rspec 3.x syntaxJeroen van Baarsen2015-02-121-0/+1
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Started on the rspec upgradeJeroen van Baarsen2015-02-121-0/+1
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Try wear_merged! without argumentDmitriy Zaporozhets2014-10-011-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>