summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Refactor coverage tools usageDmitriy Zaporozhets2014-09-191-7/+7
| | | | | | | | rspec spec # no coverage generated SIMPLECOV=true rspec spec # generate coverage locally into ./coverage COVERALLS=true rspec spec # generate and send coverage data to coveralls.io Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Ask coveralls to merge resultsDmitriy Zaporozhets2014-09-191-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Recreate tmp/tests on each test runDmitriy Zaporozhets2014-07-311-8/+1
|
* Remove rails observers from applicationDmitriy Zaporozhets2014-06-171-1/+1
|
* Disable fixturesJeroen van Baarsen2014-06-061-1/+2
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Remove SporkRobert Speicher2014-03-241-57/+44
|
* Merge Request on forked projectsIzaak Alpert2013-07-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The good: - You can do a merge request for a forked commit and it will merge properly (i.e. it does work). - Push events take into account merge requests on forked projects - Tests around merge_actions now present, spinach, and other rspec tests - Satellites now clean themselves up rather then recreate The questionable: - Events only know about target projects - Project's merge requests only hold on to MR's where they are the target - All operations performed in the satellite The bad: - Duplication between project's repositories and satellites (e.g. commits_between) (for reference: http://feedback.gitlab.com/forums/176466-general/suggestions/3456722-merge-requests-between-projects-repos) Fixes: Make test repos/satellites only create when needed -Spinach/Rspec now only initialize test directory, and setup stubs (things that are relatively cheap) -project_with_code, source_project_with_code, and target_project_with_code now create/destroy their repos individually -fixed remote removal -How to merge renders properly -Update emails to show project/branches -Edit MR doesn't set target branch -Fix some failures on editing/creating merge requests, added a test -Added back a test around merge request observer -Clean up project_transfer_spec, Remove duplicate enable/disable observers -Ensure satellite lock files are cleaned up, Attempted to add some testing around these as well -Signifant speed ups for tests -Update formatting ordering in notes_on_merge_requests -Remove wiki schema update Fixes for search/search results -Search results was using by_project for a list of projects, updated this to use in_projects -updated search results to reference the correct (target) project -udpated search results to print both sides of the merge request Change-Id: I19407990a0950945cc95d62089cbcc6262dab1a8
* Specs refactoring to reduce test time. Disabled observers by default for specsDmitriy Zaporozhets2013-04-101-1/+3
|
* Project.repository should never be nil so you can call repository.exists? or ↵Dmitriy Zaporozhets2013-04-011-5/+1
| | | | | | repository.empty? Also specify separate project factory for project with filled repo
* Spork support addedAndrew8xx82013-03-261-43/+58
|
* Fix travis failure randomly, because Capybara.default_wait_time is too short.Sato Hiroyuki2013-03-211-0/+1
|
* add coveralls.io to travis buildsDmitriy Zaporozhets2013-03-101-0/+4
|
* improve selectors to pass capybara 2.0Dmitriy Zaporozhets2013-02-211-3/+2
|
* Add LoginHelpers to feature typeDmitriy Zaporozhets2013-02-211-0/+1
|
* No gitolite in project any moreDmitriy Zaporozhets2013-02-111-1/+1
|
* remove gitolite stubDmitriy Zaporozhets2013-02-041-3/+0
|
* sidekiq with green testsDmitriy Zaporozhets2013-01-091-0/+2
|
* organize simplecovDmitriy Zaporozhets2013-01-071-4/+1
|
* Fix api specs. Use id instead pathDmitriy Zaporozhets2013-01-021-7/+4
|
* Fix few bugs and tests after refactoring ownership logicDmitriy Zaporozhets2013-01-021-1/+1
|
* Update uses of Gitolite.config.foo settingsRiyad Preukschas2012-12-201-3/+3
|
* Increased test coverageDmitriy Zaporozhets2012-11-211-0/+5
|
* Use poltergeist instaead of capybara-webkitDmitriy Zaporozhets2012-11-161-8/+2
|
* Add TreeController and specRobert Speicher2012-09-261-0/+1
|
* All specs and features currently passing with FactoryGirlRobert Speicher2012-08-281-0/+1
|
* Remove spec/factory and spec/factoriesRobert Speicher2012-08-281-1/+0
|
* Use similar interface to access gitoliterandx2012-08-291-0/+3
| | | | | | | | | Simplified gitolite handle logic Stubn over monkeypatch Stub only specific methods in Gitlab:Gitolite Moved grach auth to lib added specs for keys observer removes SshKey role
* Add a simple `api` method to ApiHelpers, replacing api_prefixRobert Speicher2012-08-251-1/+0
| | | | See docs for usage