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
Add specs
Fix preview
Adds permission specs
Fix preview permissions
Fix work package preview permission
Make preview a normal view
Add 'nothing to preview' message
Authorize through #find_optional_project
Reset order of preview texts
Add preview object authorization specs
Authorize preview object access
Preview caption reflects the previewed attribute
Fix comment layout