diff --git a/lib/open_project/reporting/disabled_specs.rb b/lib/open_project/reporting/disabled_specs.rb new file mode 100644 index 0000000000..bed26b81ca --- /dev/null +++ b/lib/open_project/reporting/disabled_specs.rb @@ -0,0 +1,6 @@ +if Rails.env.test? + require 'rspec/example_disabler' + RSpec::ExampleDisabler.disable_example('Top menu items as a user with permissions displays all options', 'plugin openproject-reporting removes the menu item') + RSpec::ExampleDisabler.disable_example('Top menu items as an admin visits the time sheet page', 'plugin openproject-reporting removes the menu item') + RSpec::ExampleDisabler.disable_example('Top menu items as an admin displays all items', 'plugin openproject-reporting removes the menu item') +end diff --git a/lib/open_project/reporting/engine.rb b/lib/open_project/reporting/engine.rb index 03333e803e..7d1a67c0ac 100644 --- a/lib/open_project/reporting/engine.rb +++ b/lib/open_project/reporting/engine.rb @@ -84,6 +84,10 @@ module OpenProject::Reporting ) end + initializer 'reporting.register_test_path' do |app| + require File.join(File.dirname(__FILE__), 'disabled_specs') + end + config.to_prepare do require_dependency 'report/walker' require_dependency 'report/transformer'