Bump RSpec to ~2.14; bundle update

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Convert specs to RSpec 2.14.8 syntax with Transpec

This conversion is done by Transpec 1.10.4 with the following command:
    transpec

* 1414 conversions
    from: obj.should
      to: expect(obj).to

* 646 conversions
    from: == expected
      to: eq(expected)

* 376 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 107 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 70 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 45 conversions
    from: =~ [1, 2]
      to: match_array([1, 2])

* 27 conversions
    from: lambda { }.should
      to: expect { }.to

* 13 conversions
    from: Klass.any_instance.stub(:message)
      to: allow_any_instance_of(Klass).to receive(:message)

* 8 conversions
    from: === expected
      to: be === expected

* 7 conversions
    from: expect { }.not_to raise_error(SpecificErrorClass)
      to: expect { }.not_to raise_error

* 6 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 2 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 1 conversion
    from: < expected
      to: be < expected

* 1 conversion
    from: obj.stub!(:message)
      to: allow(obj).to receive(:message)

* 1 conversion
    from: stub('something')
      to: double('something')
Fix disable_flash_sweep spec helper

Broken in previous commit 26ade602:

RSpec::Mocks.allow_message is a lower-level API method, allowing us
to define a stub outside of an ExampleGroup context.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Use disable_flash_sweep in UsersController spec

Helper fixed in previous commit e31bec17.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Fix args passed to image_tag in ViewHelpers spec

Deprecated negative raise_error expectations were removed by Transpec
in previous commit 26ade602: this example was previously masking an
ArgumentError.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Mark a failing wiki routing spec as pending

RSpec should syntax masked an issue with the route_to matcher on a
separate line not being called.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Configure RSpec to disable should syntax

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Replace #=~ (operator matcher) with #match_array

RSpec expect syntax no longer supports this operator matcher.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Fix pending wiki routing spec: correct HTTP verb

* remove query params from expectation, since routing specs do not
  test these.

/ HT: @hschink

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Revert bundle update; Bump rspec-rails version

The previous bundle update of all dependencies broke execution of unit
tests: I've yet to determine a more specific cause.

This partially reverts commit 6ea4ed825f231bd3db47e5a73c7c3874f7deb861.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Peg simplecov version to 0.8.0.pre

simplecov >= 0.8.1 causes an issue preventing execution of the
Test::Unit suite.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Revert "Configure RSpec to disable should syntax"

This will break specs on installations with plugins. Reverting until
popular plugins are also migrated to the new RSpec syntax
(see new task: https://www.openproject.org/work_packages/5674)

This reverts commit 4774aeb4ee70b546c37a0a94e565678272bdf042.
Attempt to work-around an AccountController CI failure

     NoMethodError:
       undefined method `original_path_set' for nil:NilClass

Failure only occurs with a full plugin configuration.

See https://github.com/rspec/rspec-rails/issues/860
Fix failing AccountController#register spec

With an OpenProject config containing private plugins this spec will
fail with the following Error:

    ActionView::Template::Error: undefined method `allow_password_changes?' for nil:NilClass
    ./app/models/user.rb:377:in `change_password_allowed?'

This failure was most likely previously obscured because
`render_views` was not enabled.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Use strong_parameters for User, remove safe_attribtues
Fix Users controller test with strong parameters
Remove attr_protected on User now that we use strong_parameters
Allow plugins to add permitted attributes
Add spec for PermittedParams.add_permitted_attributes
Merge pull request #1080 from opf/feature/users_strong_parameters

Use ForbiddenAttributesProtection for User