diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-10 22:18:37 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-04-10 22:18:37 +1100 |
commit | 1a455f3d5c2607c81af4f45a971f310d9210c2ba (patch) | |
tree | 9cc2bc2b5b319d5b519f3e2f602bade2e38aab19 /bin | |
parent | 74bb5b21bfaeaceec582934e2f7cf3603e63bef7 (diff) | |
download | gitlab-ce-1a455f3d5c2607c81af4f45a971f310d9210c2ba.tar.gz |
[Rails5] Fix running spinach tests
1. Add support for `RAILS5=1|true` for the `bin/spinach` command.
2. Synchronize used spinach versions both for rails4 and rails5.
For rails5 it was accidently used spinach 0.10.1 instead of 0.8.10.
That brought some problems on running spinach tests.
Example of failure message:
NoMethodError: undefined method `line' for #<Spinach::Scenario:0x000000000c86ba80>
Did you mean? lines
/builds/gitlab-org/gitlab-ce/features/support/env.rb:52:in `before_scenario_run'
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spinach | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/spinach b/bin/spinach index 474050e29d1..eda81c9ed8a 100755 --- a/bin/spinach +++ b/bin/spinach @@ -1,4 +1,9 @@ #!/usr/bin/env ruby + +# Remove this block when removing rails5? code. +gemfile = %w[1 true].include?(ENV["RAILS5"]) ? "Gemfile.rails5" : "Gemfile" +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__) + begin load File.expand_path('../spring', __FILE__) rescue LoadError => e |