Bump rspec, rspec-rails to ~2.99.0.beta2

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

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

* 402 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 67 conversions
    from: be_true
      to: be_truthy

* 55 conversions
    from: be_false
      to: be_falsey

* 35 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

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

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

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

* 1 conversion
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 1 conversion
    from: Klass.any_instance.stub(:message)
      to: allow_any_instance_of(Klass).to receive(:message)

* 1 conversion
    from: after { example }
      to: after { |example| example }

* 1 conversion
    from: pending
      to: skip
Merge branch 'dev' into feature/rspec-299

Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	Gemfile
	spec/controllers/account_controller_spec.rb
	spec/models/query_spec.rb
	spec/models/user_spec.rb
Bump rspec, rspec-rails to (released) ~2.99.0

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Merge branch 'dev' into feature/rspec-299

Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	Gemfile.lock
	spec/controllers/work_packages/context_menus_controller_spec.rb
	spec/models/group_spec.rb
	spec/spec_helper.rb
Use alternative factory_girl callback syntax

factory_girl's `before` and `after` callback methods appear to confuse
Transpec dynamic code analysis:

    /Users/alexbcoles/.gem/ruby/2.1.1/gems/factory_girl-4.2.0/lib/factory_girl/definition_proxy.rb:35:in `add_attribute': wrong number of arguments (5 for 1..2) (ArgumentError)
    	from /Users/alexbcoles/.gem/ruby/2.1.1/gems/factory_girl-4.2.0/lib/factory_girl/definition_proxy.rb:89:in `method_missing'

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

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

* 100 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 17 conversions
    from: expect(collection).to have(n).items
      to: expect(collection.size).to eq(n)

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

* 9 conversions
    from: be_true
      to: be_truthy

* 9 conversions
    from: expect(obj).to have(n).errors_on(...)
      to: expect(obj.errors_on(...).size).to eq(n)

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

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

* 2 conversions
    from: be_false
      to: be_falsey

* 2 conversions
    from: expect(obj).to have(n).error_on(...)
      to: expect(obj.error_on(...).size).to eq(n)

* 2 conversions
    from: pending 'is an example' { }
      to: skip 'is an example' { }

* 1 conversion
    from: before { example }
      to: before { |example| example }

* 1 conversion
    from: expect(collection).to have_at_least(n).items
      to: expect(collection.size).to be >= n

* 1 conversion
    from: obj.unstub(:message)
      to: allow(obj).to receive(:message).and_call_original

* 1 conversion
    from: pending
      to: skip
Merge branch 'dev' into feature/rspec-299

Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	spec/controllers/api/experimental/work_packages_controller_spec.rb
	spec/features/accessibility/work_packages/work_package_query_spec.rb
	spec/models/activity/work_package_activity_provider_spec.rb
	spec/spec_helper.rb
	spec/views/api/experimental/work_packages/index_api_json_spec.rb
Fix incorrectly converted collection assertions

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Fix incorrectly converted assertion in Copy spec

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Fix incorrectly converted validation assertions

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

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

* 72 conversions
    from: describe 'some controller' { }
      to: describe 'some controller', :type => :controller { }

* 57 conversions
    from: describe 'some model' { }
      to: describe 'some model', :type => :model { }

* 49 conversions
    from: describe 'some view' { }
      to: describe 'some view', :type => :view { }

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

* 27 conversions
    from: describe 'some routing' { }
      to: describe 'some routing', :type => :routing { }

* 8 conversions
    from: describe 'some feature' { }
      to: describe 'some feature', :type => :feature { }

* 7 conversions
    from: describe 'some helper' { }
      to: describe 'some helper', :type => :helper { }

* 5 conversions
    from: be_true
      to: be_truthy

* 5 conversions
    from: describe 'some request' { }
      to: describe 'some request', :type => :request { }

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

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

* 1 conversion
    from: before { example }
      to: before { |example| example }

* 1 conversion
    from: describe 'some mailer' { }
      to: describe 'some mailer', :type => :mailer { }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
Fix incorrectly added type metadata

Broken in e137ed81

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Mark broken ApplicationHelper specs pending

`is_expected.to` (equivalent to `expect(subject).to`) with an explicit
subject appears to have different semantics to plain `should`.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Mark broken WorkPackage specs as pending

`is_expected.to` (equivalent to `expect(subject).to`) with an explicit
subject appears to have different semantics to plain `should`.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Add rspec-activemodel-mocks dependency

Adds back `stub_model` and `mock_model`, which were deprecated in
rspec-mocks 2.99.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Remove deprecated argument to RSpec::Mocks.setup

This also appeared to be causing certain test-unit tests to hang.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Remove superfluous begin in test_helper #teardown

Signed-off-by: Alex Coles <alex@alexbcoles.com>
Merge branch 'dev' into feature/rspec-299
Merge branch 'dev' into feature/rspec-299

Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	spec/api/work_package_resource_spec.rb