Fix layout
[fix #4928] Made journal notes shown in search.

- Added tests and specs for bug #4928
- Examined bug
  - Added debug output to examine event contents
  - Examined journals
- Added highlight_first helper
  - Used last_journal instead of #journals.last
  - Fixed Journalized#last_journal to work when eager loading messed up search
  - Fixed how journals are sorted when they are loaded (by version instead
    of created_at)
- Added notes anchor when required
  - Added notes anchor when required
  - Note anchor uses version of journal note itself, not version of work package
- Fixed failed test in
  functional/wiki_controlller_test.rb:WikiControllerTest
  #test_update_stale_page_should_not_raise_an_error
- Fixed spec failures.
- Converted search helper test -> spec, removed test file.
- Moved helper methods from string to controller
- Fixed search controller spec.
- Temporary added isolated suite run to travis for
  work_package_activity_provider_spec
- Removed temporary job for travis.
[security] fixed back url verification

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4013018
fix protocol-relative redirection test

- escape forward slash in regexp
- allow redirection to home_path '/'
make url redirect tests pass

I don't know why, but the test doesn't pass when both url-tests
are in the same test-method.
When defined in separate test-methods they work fine.
add test for login redirecting to home_url
explicitly allow home path in back_url
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>
Add wiki history cuke
Adds wiki child page creation cuke
Fix cuke for postgres
Merge pull request #1063 from opf/feature/wiki_history_cuke

[Feature] Wiki history cuke
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>
Merge pull request #1053 from waterlink/bugfix/4928_search_journal_note_hits_not_shown