Commit Graph

15 Commits

Author SHA1 Message Date
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
Jeff Wong cf86f27415 FEATURE: New setting to allow all caps posts
Adds a setting to ignore text_sentinel's check on all caps content.
2015-11-18 09:50:50 -08:00
Robin Ward 4ab9ef3497 FIX: Allow long words if they contain periods 2015-05-19 13:10:25 -04:00
Luciano Sousa 0fd98b56d8 few components with rspec3 syntax 2015-01-09 13:34:37 -03:00
Nathan Nontell d95172cb5d Allow TextSentinel#seems_unpretentious? to accept words joined with dashes or forward slashes. (Issue 1133) 2013-09-16 09:45:57 -04:00
Neil Lalonde f611a5d898 If min entropy setting is greater than min post/body length setting, then use a sensible min entropy value instead 2013-08-28 11:04:28 -04:00
Neil Lalonde 876a570e3a Fix to prevent check for all upper case for non-ascii messages 2013-06-17 12:22:50 -04:00
Michael Brown bb77d2c38b More entropy for foreign titles
* Treat strings with non-ASCII characters as having more entropy
2013-06-07 14:47:07 -04:00
Régis Hanol c5cf8be864 auto replace rules in titles 2013-04-10 11:00:50 +02:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Jeremy Banks eb2a5e4654 Merge branch 'origin/master'
Conflicts:
	lib/text_sentinel.rb
2013-02-18 21:41:20 -05:00
Jeremy Banks 6af69f7e77 Do not strip leading and trailing whitespace from raw posts. 2013-02-15 20:58:33 -05:00
Alexander 6c4ae05454 Removes iconv dependency
Fixes #100
2013-02-15 13:36:19 -08:00
Robin Ward d740d7b25f Fix for foreign language titles: Only enforce upper case rule on english alphabet. 2013-02-14 16:09:57 -05:00
Robin Ward 40da901e5d Introduction of TextSentinel to enforce title and body quality. 2013-02-06 20:53:34 -05:00