From 853fc2f934c6e5fc6315efc4dade36f84d45852d Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Wed, 22 Oct 2014 10:46:24 +0200 Subject: [PATCH] Disable failing core spec --- lib/open_project/costs/disabled_specs.rb | 4 ++++ lib/open_project/costs/engine.rb | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 lib/open_project/costs/disabled_specs.rb diff --git a/lib/open_project/costs/disabled_specs.rb b/lib/open_project/costs/disabled_specs.rb new file mode 100644 index 0000000000..ad5b6ce306 --- /dev/null +++ b/lib/open_project/costs/disabled_specs.rb @@ -0,0 +1,4 @@ +if Rails.env.test? + require 'rspec/example_disabler' + RSpec::ExampleDisabler.disable_example('WorkPackagesController index with valid query settings passed to front-end client visible attributes all attributes visible', 'plugin openproject-costs changes behavior') +end diff --git a/lib/open_project/costs/engine.rb b/lib/open_project/costs/engine.rb index 73840b5e59..0ebf3c1e22 100644 --- a/lib/open_project/costs/engine.rb +++ b/lib/open_project/costs/engine.rb @@ -193,6 +193,11 @@ module OpenProject::Costs ActiveRecord::Base.observers.push :rate_observer, :default_hourly_rate_observer, :costs_work_package_observer end + initializer 'costs.register_test_path' do |app| + require File.join(File.dirname(__FILE__), 'disabled_specs') + app.config.plugins_to_test_paths << root + end + initializer 'costs.patch_number_helper' do |app| # we have to do the patching in the initializer to make sure we only do this once in development # since the NumberHelper is not unloaded