Merge pull request #8226 from opf/fix/bump_test_gems

Fix/bump test gems
pull/8239/head
ulferts 5 years ago committed by GitHub
commit a50fd22741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Gemfile
  2. 8
      Gemfile.lock
  3. 2
      lib/open_project/plugins/acts_as_op_engine.rb
  4. 36
      spec/lib/open_project/configuration_spec.rb

@ -200,7 +200,7 @@ group :test do
gem 'rspec', '~> 3.9.0'
gem 'rspec-activemodel-mocks', '~> 1.1.0', git: 'https://github.com/rspec/rspec-activemodel-mocks'
# also add to development group, so "spec" rake task gets loaded
gem 'rspec-rails', '~> 4.0.0.rc1', group: :development
gem 'rspec-rails', '~> 4.0.0', group: :development
# Retry failures within the same environment
gem 'retriable', '~> 3.1.1'
@ -214,10 +214,10 @@ group :test do
# brings back testing for 'assigns' and 'assert_template' extracted in rails 5
gem 'rails-controller-testing', '~> 1.0.2'
gem 'capybara', '~> 3.31.0'
gem 'capybara', '~> 3.32.0'
gem 'capybara-screenshot', '~> 1.0.17'
gem 'webdrivers', '~> 4.2.0', require: false
gem 'selenium-webdriver', '~> 3.14'
gem 'webdrivers', '~> 4.2.0', require: false
gem 'fuubar', '~> 2.5.0'
gem 'timecop', '~> 0.9.0'

@ -325,7 +325,7 @@ GEM
browser (2.6.1)
builder (3.2.4)
byebug (11.1.1)
capybara (3.31.0)
capybara (3.32.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
@ -803,7 +803,7 @@ GEM
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.0.rc1)
rspec-rails (4.0.0)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
@ -970,7 +970,7 @@ DEPENDENCIES
bourbon (~> 6.0.0)
brakeman (~> 4.8.0)
browser (~> 2.6.1)
capybara (~> 3.31.0)
capybara (~> 3.32.0)
capybara-screenshot (~> 1.0.17)
carrierwave (~> 1.3.1)
cells-erb (~> 0.1.0)
@ -1079,7 +1079,7 @@ DEPENDENCIES
rspec (~> 3.9.0)
rspec-activemodel-mocks (~> 1.1.0)!
rspec-example_disabler!
rspec-rails (~> 4.0.0.rc1)
rspec-rails (~> 4.0.0)
rspec-retry (~> 0.6.1)
rubocop
ruby-duration (~> 3.2.0)

@ -179,7 +179,7 @@ module OpenProject::Plugins
# block: Pass a block to the plugin (for defining permissions, menu items and the like)
def register(gem_name, options, &block)
self.class.initializer "#{engine_name}.register_plugin" do
spec = Bundler.environment.specs[gem_name][0]
spec = Bundler.load.specs[gem_name][0]
p = Redmine::Plugin.register engine_name.to_sym do
name spec.summary

@ -30,14 +30,14 @@ require 'spec_helper'
describe OpenProject::Configuration do
describe '.load_config_from_file' do
let(:file_contents) {
let(:file_contents) do
<<-EOS
default:
test:
somesetting: foo
EOS
}
end
before do
allow(File).to receive(:read).and_call_original
allow(File).to receive(:read).with('configfilename').and_return(file_contents)
@ -55,12 +55,12 @@ describe OpenProject::Configuration do
describe '.load_env_from_config' do
describe 'with a default setting' do
let(:config) {
let(:config) do
OpenProject::Configuration.send(:load_env_from_config, {
'default' => { 'somesetting' => 'foo' },
'test' => {},
'someother' => { 'somesetting' => 'bar' }
}, 'test')}
}, 'test') end
it 'should load a default setting' do
expect(config['somesetting']).to eq('foo')
@ -68,11 +68,11 @@ describe OpenProject::Configuration do
end
describe 'with an environment-specific setting' do
let(:config) {
let(:config) do
OpenProject::Configuration.send(:load_env_from_config, {
'default' => {},
'test' => { 'somesetting' => 'foo' }
}, 'test')}
}, 'test') end
it 'should load a setting' do
expect(config['somesetting']).to eq('foo')
@ -80,11 +80,11 @@ describe OpenProject::Configuration do
end
describe 'with a default and an overriding environment-specific setting' do
let(:config) {
let(:config) do
OpenProject::Configuration.send(:load_env_from_config, {
'default' => { 'somesetting' => 'foo' },
'test' => { 'somesetting' => 'bar' }
}, 'test')}
}, 'test') end
it 'should load the overriding value' do
expect(config['somesetting']).to eq('bar')
@ -93,7 +93,7 @@ describe OpenProject::Configuration do
end
describe '.load_overrides_from_environment_variables' do
let(:config) {
let(:config) do
{
'someemptysetting' => nil,
'nil' => 'foobar',
@ -114,9 +114,9 @@ describe OpenProject::Configuration do
}
}
}
}
end
let(:env_vars) {
let(:env_vars) do
{
'SOMEEMPTYSETTING' => '',
'SOMESETTING' => 'bar',
@ -128,7 +128,7 @@ describe OpenProject::Configuration do
'OPTEST_NESTED_HASH' => '{ foo: bar, xyz: bla }',
'OPTEST_FOO_BAR_HASH__WITH__SYMBOLS' => '{ foo: !ruby/symbol foobar }'
}
}
end
before do
stub_const('OpenProject::Configuration::ENV_PREFIX', 'OPTEST')
@ -194,7 +194,7 @@ describe OpenProject::Configuration do
end
describe '.convert_old_email_settings' do
let(:settings) {
let(:settings) do
{
'email_delivery' => {
'delivery_method' => :smtp,
@ -204,7 +204,7 @@ describe OpenProject::Configuration do
'port' => 25,
'domain' => 'example.net'
} } }
}
end
context 'with delivery_method' do
before do
@ -288,7 +288,7 @@ describe OpenProject::Configuration do
end
describe '.reload_mailer_configuration!' do
let(:action_mailer) { double('ActionMailer::Base', smtp_settings: {}) }
let(:action_mailer) { double('ActionMailer::Base', smtp_settings: {}, deliveries: []) }
before do
stub_const('ActionMailer::Base', action_mailer)
@ -395,12 +395,12 @@ describe OpenProject::Configuration do
end
describe '.configure_legacy_action_mailer' do
let(:action_mailer) { double('ActionMailer::Base') }
let(:config) {
let(:action_mailer) { double('ActionMailer::Base', deliveries: []) }
let(:config) do
{ 'email_delivery_method' => 'smtp',
'smtp_address' => 'smtp.example.net',
'smtp_port' => '25' }
}
end
before do
stub_const('ActionMailer::Base', action_mailer)

Loading…
Cancel
Save