Commit 552c6d4598f6396456c569cfece98ae469bfa84c
1 parent
9ada6788
Exists in
master
and in
4 other branches
Make tests green for postgres
Showing
5 changed files
with
15 additions
and
12 deletions
Show diff stats
.travis.yml
| @@ -19,8 +19,7 @@ services: | @@ -19,8 +19,7 @@ services: | ||
| 19 | before_script: | 19 | before_script: |
| 20 | - "cp config/database.yml.$DB config/database.yml" | 20 | - "cp config/database.yml.$DB config/database.yml" |
| 21 | - "cp config/gitlab.yml.example config/gitlab.yml" | 21 | - "cp config/gitlab.yml.example config/gitlab.yml" |
| 22 | - - "bundle exec rake db:create RAILS_ENV=test" | ||
| 23 | - - "bundle exec rake db:migrate RAILS_ENV=test" | 22 | + - "bundle exec rake db:setup RAILS_ENV=test" |
| 24 | - "bundle exec rake db:seed_fu RAILS_ENV=test" | 23 | - "bundle exec rake db:seed_fu RAILS_ENV=test" |
| 25 | - "sh -e /etc/init.d/xvfb start" | 24 | - "sh -e /etc/init.d/xvfb start" |
| 26 | script: "bundle exec rake travis --trace" | 25 | script: "bundle exec rake travis --trace" |
Gemfile
| @@ -124,7 +124,7 @@ group :development, :test do | @@ -124,7 +124,7 @@ group :development, :test do | ||
| 124 | gem "capybara" | 124 | gem "capybara" |
| 125 | gem "pry" | 125 | gem "pry" |
| 126 | gem "awesome_print" | 126 | gem "awesome_print" |
| 127 | - gem "database_cleaner" | 127 | + gem "database_cleaner", ref: "f89c34300e114be99532f14c115b2799a3380ac6", git: "https://github.com/bmabey/database_cleaner.git" |
| 128 | gem "launchy" | 128 | gem "launchy" |
| 129 | gem 'factory_girl_rails' | 129 | gem 'factory_girl_rails' |
| 130 | 130 |
Gemfile.lock
| 1 | GIT | 1 | GIT |
| 2 | + remote: https://github.com/bmabey/database_cleaner.git | ||
| 3 | + revision: f89c34300e114be99532f14c115b2799a3380ac6 | ||
| 4 | + ref: f89c34300e114be99532f14c115b2799a3380ac6 | ||
| 5 | + specs: | ||
| 6 | + database_cleaner (0.9.1) | ||
| 7 | + | ||
| 8 | +GIT | ||
| 2 | remote: https://github.com/ctran/annotate_models.git | 9 | remote: https://github.com/ctran/annotate_models.git |
| 3 | revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e | 10 | revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e |
| 4 | specs: | 11 | specs: |
| @@ -140,7 +147,6 @@ GEM | @@ -140,7 +147,6 @@ GEM | ||
| 140 | colorize (0.5.8) | 147 | colorize (0.5.8) |
| 141 | crack (0.3.1) | 148 | crack (0.3.1) |
| 142 | daemons (1.1.9) | 149 | daemons (1.1.9) |
| 143 | - database_cleaner (0.9.1) | ||
| 144 | devise (2.1.2) | 150 | devise (2.1.2) |
| 145 | bcrypt-ruby (~> 3.0) | 151 | bcrypt-ruby (~> 3.0) |
| 146 | orm_adapter (~> 0.1) | 152 | orm_adapter (~> 0.1) |
| @@ -458,7 +464,7 @@ DEPENDENCIES | @@ -458,7 +464,7 @@ DEPENDENCIES | ||
| 458 | chosen-rails (= 0.9.8) | 464 | chosen-rails (= 0.9.8) |
| 459 | coffee-rails (~> 3.2.2) | 465 | coffee-rails (~> 3.2.2) |
| 460 | colored | 466 | colored |
| 461 | - database_cleaner | 467 | + database_cleaner! |
| 462 | devise (~> 2.1.0) | 468 | devise (~> 2.1.0) |
| 463 | draper (~> 0.18.0) | 469 | draper (~> 0.18.0) |
| 464 | email_spec | 470 | email_spec |
features/support/env.rb
| @@ -36,8 +36,6 @@ Spinach.hooks.before_scenario do | @@ -36,8 +36,6 @@ Spinach.hooks.before_scenario do | ||
| 36 | Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path')) | 36 | Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path')) |
| 37 | FileUtils.rm_rf Gitlab.config.git_base_path | 37 | FileUtils.rm_rf Gitlab.config.git_base_path |
| 38 | FileUtils.mkdir_p Gitlab.config.git_base_path | 38 | FileUtils.mkdir_p Gitlab.config.git_base_path |
| 39 | - | ||
| 40 | - DatabaseCleaner.start | ||
| 41 | end | 39 | end |
| 42 | 40 | ||
| 43 | Spinach.hooks.after_scenario do | 41 | Spinach.hooks.after_scenario do |
spec/requests/issues_spec.rb
| @@ -91,13 +91,13 @@ describe "Issues" do | @@ -91,13 +91,13 @@ describe "Issues" do | ||
| 91 | title: title) | 91 | title: title) |
| 92 | end | 92 | end |
| 93 | 93 | ||
| 94 | - issue = Issue.first # with title 'foobar' | ||
| 95 | - issue.milestone = create(:milestone, project: project) | ||
| 96 | - issue.assignee = nil | ||
| 97 | - issue.save | 94 | + @issue = Issue.first # with title 'foobar' |
| 95 | + @issue.milestone = create(:milestone, project: project) | ||
| 96 | + @issue.assignee = nil | ||
| 97 | + @issue.save | ||
| 98 | end | 98 | end |
| 99 | 99 | ||
| 100 | - let(:issue) { Issue.first } | 100 | + let(:issue) { @issue } |
| 101 | 101 | ||
| 102 | it "should allow filtering by issues with no specified milestone" do | 102 | it "should allow filtering by issues with no specified milestone" do |
| 103 | visit project_issues_path(project, milestone_id: '0') | 103 | visit project_issues_path(project, milestone_id: '0') |