Commit Graph

32 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
Neil Lalonde 00e1659a57 remove some intermittently failing report specs. they aren't worth the cost of maintaining them. 2015-07-06 15:01:43 -04:00
Neil Lalonde 8c84e60df6 FIX: application request numbers for prev 30 day period was for current 30 day period minus today, not previous 30 days 2015-07-06 15:01:43 -04:00
Ed Gibbs 5650428052 FIX: Sort page views report records
Adding a sort ascending by date to the page views report.
2015-04-12 10:46:13 -07:00
Sam 37fefc16de workaround, something about report spec is messed up 2015-03-02 12:29:56 +11:00
Sam eb7a5c251d freeze time in report spec so it has consistent results 2015-02-05 11:33:13 +11:00
Sam 0b14cfa2c3 skip failing spec, something is off with timezones 2015-01-09 12:03:08 +11:00
Luciano Sousa b52f12948a models with rspec3 syntax 2015-01-05 13:04:23 -03:00
Luciano Sousa b3d769ff4f Update rspec syntax to v3
update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
2015-01-05 11:59:30 -03:00
Erick Guan 97b3914b70 FIX: use utc time when generate reports; set boundary 2014-12-30 22:43:03 +08:00
Erick Guan fe7f2c6979 FIX: today visits not shown 2014-12-30 03:09:22 +08:00
Sam 59d04c0695 Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with

TrustLevel[1], TrustLevel[2] etc.

This gives us much better flexibility naming trust levels, these names
are meant to be controlled by various communities.
2014-09-05 15:20:52 +10:00
Martin Feckie 674e26e6c3 Updated tests to decrease string repetition
Removed an unused variable
Some minor style changes
2013-06-25 22:15:41 +08:00
Jeff Atwood b64a4100fa change "visitor" trust level to "new user"
I blame me for this mistake.. visitor means other stuff in practice. New
User is correct meaning.
2013-04-17 16:11:24 -07:00
Neil Lalonde 3b6aeb14c7 Add subtype to topics to classify private messages 2013-04-16 16:56:18 -04:00
Neil Lalonde eb212aec9b Fix dashboard totals for topics, posts, and private messages 2013-04-05 14:09:16 -04:00
Sam e61a28f3e1 utc vs non utc is a subtle issue, tests were failing for a few hours every day cause of this 2013-04-04 13:29:54 +11:00
Neil Lalonde bb18b6cb9b Dashboard: split out private messages from topic and post counts; re-enable report_spec because I think I fixed it... 2013-04-03 13:26:09 -04:00
Neil Lalonde c3c25b894a Cache dashboard data in the controller, not the report model 2013-03-20 13:54:32 -04:00
Neil Lalonde 50b04b2209 Add email counts to admin dashboard 2013-03-18 10:08:09 -04:00
Neil Lalonde 6a99d12784 Add likes to admin dashboard 2013-03-18 10:08:08 -04:00
Neil Lalonde 0e63de59b5 Comment out report_spec.rb for now because it fails sometimes 2013-03-16 19:42:23 -04:00
Neil Lalonde d9cdde9aa7 Add user counts for each trust level to admin dashboard 2013-03-15 18:09:02 -04:00
Neil Lalonde 8983df9856 Show current user count for now, not at different points in time 2013-03-15 18:09:01 -04:00
Robin Ward 1a60301a17 Merge branch 'fixes-topic-title-length-too-short' of git://github.com/ZogStriP/discourse
Conflicts:
	app/assets/javascripts/discourse/controllers/composer_controller.js
	app/assets/javascripts/discourse/views/composer_view.js
	config/locales/client.en.yml
2013-03-15 16:49:17 -04:00
Sam fcc6aac008 hacked dates so jeff sees no more 1mons everywhere. 2013-03-13 00:05:21 -07:00
Neil Lalonde 40c27ff3cf Add flag counts to admin dashboard 2013-03-12 14:40:59 -04:00
Neil Lalonde 4eda422cdf Add total users report; restructure dashboard reports js 2013-03-12 14:40:59 -04:00
Neil Lalonde f1908fd8e8 Fix report_spec so it's not so fussy and breaks sometimes 2013-03-11 10:40:13 -04:00
Sam 621f946193 fuff with test so it passes 2013-03-10 19:58:42 -07:00
Neil Lalonde 8927432a93 Add stats to the admin dashboard 2013-03-09 15:34:27 -05:00
Robin Ward dc8e1196fd Code to support EmberJS + Discourse Tutorial feature: Admin Reports 2013-02-27 22:40:36 -05:00