aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
Commit message (Collapse)AuthorAgeLines
* Exclude .bundle from coverage reports.Louise Crow2015-03-02-0/+1
|
* fixup! Replace existing PublicBodyCategories functionality with db models ↵Louise Crow2014-09-24-8/+0
| | | | PublicBodyCategory and PublicBodyHeading
* Rename XXX comments with TODO:Gareth Rees2014-06-10-1/+1
| | | | Picks these up in `rake notes` and adds semantic meaning
* Add AttachmentToHTML libraryGareth Rees2014-03-28-0/+1
| | | | | | | | | | | | Extracts the attachment processing from FoiAttachment#body_to_html AttachmentToHTML contains adapters which convert - text/plain - application/pdf - application/rtf Results are returned as an AttachmentHTML::HTML instance which contains the raw HTML and other metadata about the conversion.
* Tighten up expectation, make expected files consistent.Louise Crow2014-01-17-0/+13
| | | | | | | Just expecting the parsed file to include the expected one would mean success in the case where nothing has been folded. Tighten up the expectation, and add quoting placeholders to expected files that didn't have them.
* Make test fail as with issue #1001Louise Crow2014-01-14-0/+5
| | | | | This requires us to clear the I18n.fallbacks when changing the I18n.default_locale, otherwise the old default locale remains there.
* Move themes from vendor/plugins to lib/themesMark Longair2013-12-03-0/+1
| | | | | | | | | | These are essentially required in exactly the same way as before, but from lib/themes rather than vendor/plugins. This is the simplest possible change in order make the themes work outside vendor/plugins, I think, but it's not necessarily ideal. It would be worth considering whether these should be changed to Rails engines, as described here: http://guides.rubyonrails.org/engines.html
* Move acts_as_xapian out of vendor/pluginsMark Longair2013-11-29-0/+1
| | | | | This includes making making sure that xapiandbs directory is moved with this version of the code.
* Move has_tag_string out of vendor/pluginsMark Longair2013-11-29-0/+1
|
* Move strip_attributes out of vendor/pluginsMark Longair2013-11-29-0/+1
|
* Add a helper method for temporarily setting I18n.default_localeMark Longair2013-11-19-0/+8
| | | | | | Although the I18n library has an I18n.with_locale helper, there's no equivalent for I18n.default_locale. This method will make a couple of our tests clearer and less brittle.
* For percentage stats, exclude hidden or unclassified requestsMark Longair2013-11-05-0/+25
| | | | | | | | The WDTK volunteers pointed out that it's not fair to include hidden requests in the denominator, since they're typically hidden for a good reason (e.g. being vexatious, spam, etc.), and we have no information about those that are awaiting_description (i.e. unclassified) so they should be excluded as well.
* Factor out a 'with_duplicate_xapian_job_creation' helperMark Longair2013-10-07-0/+19
| | | | | | | | | | In a subsequent commit, we will want to wrap an additional section of code with the addition and removal of a hook that creates a duplicate xapian job, so it's useful for this to be factored out. This commit introduces a 'with_duplicate_xapian_job_creation' method that can be passed a block which will be run with the forced duplicate xapian job creation.
* Make some simple factories for real objects.Louise Crow2013-09-16-0/+2
|
* Move some more config into AlaveteliLocalization so that it can be called ↵Louise Crow2013-07-24-2/+1
| | | | outside initialization e.g. in tests.
* Extract code for setting locales in FastGettext and I18nLouise Crow2013-07-18-5/+2
|
* Switch routing-filter (which takes locale out of the params and puts it in ↵Louise Crow2013-07-18-0/+10
| | | | the URL) off by default in model, controller, and helper tests. This means we can supply the locale as a param. Turn it on specifically for a couple of controller tests that test routing, and change other url localization tests into integration tests.
* Restore coveralls config.Louise Crow2013-06-04-0/+12
|
* Unraveled another test environment cleanup bug with config.order = random:33691Matthew Landauer2013-03-26-0/+13
|
* Now randomise the test order by default to help uncover order dependent issuesMatthew Landauer2013-03-19-1/+1
|
* Remove empty fixturesHenare Degan2013-03-03-3/+1
|
* This is already defined in xapian_indexHenare Degan2013-03-03-15/+0
|
* Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-2/+2
|
* Speed up tests by brining the garbage collection hack over tooHenare Degan2013-02-19-0/+14
|
* Use Spork instead of writing our ownHenare Degan2013-02-19-107/+121
|
* Bring over test-specific translations config from Rails 2 test helperHenare Degan2013-02-07-0/+4
|
* Clear out ActionMailer::Base.deliveries before each test. Rspec should be ↵Matthew Landauer2013-01-29-0/+7
| | | | doing this but isn't for controller tests
* Copy basic_auth_login spec_helper from rspec 1 to 2Matthew Landauer2013-01-29-0/+6
|
* Copied load_test_categories from rspec 2 to rspec 3 helper fileMatthew Landauer2013-01-25-0/+8
|
* Merge remote-tracking branch 'mysociety/develop' into rails-3-spikeMatthew Landauer2013-01-04-0/+14
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock Rakefile app/controllers/request_controller.rb lib/tasks/rspec.rake spec/controllers/services_controller_spec.rb spec/spec_helper.rb spec/views/request/_after_actions.rhtml_spec.rb
| * Wrap specs on the extraction of RFC-822 headers in code that sets the ENV ↵Louise Crow2012-12-11-0/+15
| | | | | | | | timezone. TMail renders headers using localtime, which is not ideal, but we're migrating away from it anyway, so I'm not sure it's worth delving into the internals of TMail to fix it.
* | Moved two needed helper functions from spec/spec_helper.rb.rails2Matthew Landauer2013-01-04-0/+23
| |
* | Load fixtures in the same way as beforeHenare Degan2012-12-11-0/+17
| | | | | | | | Makes a simple model like Holiday pass, yay
* | Set aside the Rails 2 spec_helper and generate a new oneHenare Degan2012-12-11-265/+26
|/ | | | We'll bring stuff from it back in gradually to remove unnecessary cruft
* Merge remote-tracking branch 'henare_github/relax-gc-for-tests' into developLouise Crow2012-12-10-0/+14
|\
| * Only trigger garbage collection every 4 seconds - speeds up the whole test ↵Henare Degan2012-12-08-0/+14
| | | | | | | | | | | | suite by ~35% on my machine Via https://37signals.com/svn/posts/2742-the-road-to-faster-tests
* | Add option to load_file_fixture to specify that the file contents should ↵Louise Crow2012-12-04-2/+7
|/ | | | just be loaded as binary.
* Add function to clone a clean copy of the xapian index with fixtures loaded ↵Louise Crow2012-11-21-18/+38
| | | | into it.
* Factor out method for getting a mail object from a fixture file.Louise Crow2012-11-15-0/+4
|
* Extract configuration with defaults into one moduleMatthew Landauer2012-09-25-4/+3
|
* Clearer formatting of global fixtures list.Louise Crow2012-08-22-7/+21
|
* Misc fixes to get tests to pass - notably a MonkeyPatch to work around ↵Seb Bacon2012-07-13-0/+13
| | | | problem testing template results
* Use PO files from `spec/fixtures/locale` rather than the application - makes ↵Seb Bacon2012-06-14-0/+4
| | | | it less brittle.
* More changes and refactoring to make purges work.Seb Bacon2012-04-20-1/+1
|
* Merge branch 'develop' into purge-requestsSeb Bacon2012-04-19-1/+1
|\ | | | | | | | | Conflicts: spec/controllers/request_controller_spec.rb
| * use Rails.root, not RAILS_ROOTJames McKinney2012-04-02-1/+1
| |
* | first stab at sending PURGE requests to upstream varnish for request pages. ↵Seb Bacon2012-03-13-0/+3
|/ | | | Next step: making it asynchronous, e.g. with a queue of things to purge via a cron job.
* Load all fixtures for all testsRobin Houston2012-01-31-0/+1
| | | | | | | | | The ad hoc specification of fixtures has been an ongoing source of bugs in the tests. The straw that broke the camel’s back is that 7c6eb09 requires the fixtures to be loaded in order (i.e. children before their parents), and it would have been a painful process to reorder all the dozens of different fixture lists, but the test system ought to be more reliable this way.
* Make better wording at the top of the page listing subsets of public bodies. ↵Seb Bacon2012-01-30-0/+8
| | | | At the same time, cause the tests not to rely on WDTK data. Fixes #396
* Load all raw emails for testingRobin Houston2012-01-29-7/+7
| | | | | | | | | | | Previously there was just one raw email, and the test code relied on that fact. Generalise it to handle multiple raw emails. This change causes a number of tests to fail, because it exposes failures that should have happened when the second raw email was added but were masked by the fact that the text of this second raw email was never loaded. These failures will be fixed in the next commit.