Commit Graph

16 Commits

Author SHA1 Message Date
Gerhard Schlager b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
Sam Saffron 4ea21fa2d0 DEV: use #frozen_string_literal: true on all spec
This change both speeds up specs (less strings to allocate) and helps catch
cases where methods in Discourse are mutating inputs.

Overall we will be migrating everything to use #frozen_string_literal: true
it will take a while, but this is the first and safest move in this direction
2019-04-30 10:27:42 +10:00
Maja Komel 3d9981ac5c FIX: strip invalid byte sequences 2019-02-26 10:09:51 +01:00
Rishabh eacbe28f55 FIX: Skip gsub for normalizing whitespaces when text is nil (#6631) 2018-11-20 09:12:32 +01:00
Gerhard Schlager 4881fb028f FIX: allow_uppercase_posts didn't work for topic titles 2018-10-08 23:50:06 +02:00
Arpit Jalan a4bc54a686 FIX: strip zero width spaces from topic title 2018-02-21 00:12:39 +05:30
Rafael dos Santos Silva 5324c9817f FIX: Title prettify shoundn't downcase all non-ascii titles 2017-08-08 14:03:24 -03:00
Rafael dos Santos Silva adae5d78f5 Rewrite capitalize for readability
Makes capitalize logic more clear with @sam suggestion
2016-03-20 08:35:48 -04:00
Rafael dos Santos Silva 344f7629cd Add spec to unicode upcase and downcase 2016-03-07 22:10:49 -03:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam 58c95f64d2 FIX: stop stripping zero-width-whitespace
This char is used for formatting khmer words
2015-03-27 13:03:24 +11:00
Luciano Sousa 0fd98b56d8 few components with rspec3 syntax 2015-01-09 13:34:37 -03:00
Régis Hanol f4208ae83f FEATURE: normalize whitespaces in topic title/post content 2014-08-12 00:01:58 +02:00
Konrad Borowski 8bc4264c98 Thread title fixer should ignore special cases like iLetter 2013-05-23 21:31:08 +02:00
Régis Hanol e76f629df8 Text Cleaner now removes all periods from the end of the title 2013-04-18 00:19:42 +02:00
Régis Hanol c5cf8be864 auto replace rules in titles 2013-04-10 11:00:50 +02:00