enju_search_log 0.2.0.beta.1 → 0.2.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/search_history.rb +9 -10
  3. data/lib/enju_search_log/version.rb +1 -1
  4. data/spec/controllers/search_histories_controller_spec.rb +1 -1
  5. data/spec/dummy/app/controllers/application_controller.rb +2 -2
  6. data/spec/dummy/app/models/user.rb +1 -1
  7. data/spec/dummy/config/application.rb +2 -0
  8. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  9. data/spec/dummy/db/migrate/154_create_messages.rb +23 -0
  10. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +18 -0
  11. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  12. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  13. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  14. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +18 -0
  15. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +18 -0
  16. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
  17. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  18. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
  19. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
  20. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
  21. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +9 -0
  22. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +9 -0
  23. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
  24. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
  25. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
  26. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
  27. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
  28. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
  29. data/spec/dummy/db/schema.rb +106 -5
  30. data/spec/factories/profile.rb +17 -0
  31. data/spec/factories/user.rb +43 -0
  32. data/spec/fixtures/libraries.yml +103 -0
  33. data/spec/fixtures/library_groups.yml +21 -18
  34. data/spec/fixtures/search_histories.yml +9 -10
  35. data/spec/fixtures/user_groups.yml +44 -0
  36. data/spec/models/search_history_spec.rb +10 -12
  37. data/spec/models/user_spec.rb +74 -0
  38. data/spec/rails_helper.rb +80 -0
  39. data/spec/spec_helper.rb +88 -36
  40. data/spec/support/devise.rb +2 -2
  41. metadata +178 -86
  42. data/spec/dummy/app/models/ability.rb +0 -22
@@ -0,0 +1,103 @@
1
+ ---
2
+ library_00001:
3
+ name: web
4
+ short_display_name: Web
5
+ display_name: World Wide Web
6
+ fax_number:
7
+ updated_at: 2007-08-31 00:18:06.662349 +09:00
8
+ telephone_number_1:
9
+ telephone_number_2:
10
+ id: 1
11
+ zip_code:
12
+ region:
13
+ locality:
14
+ street:
15
+ created_at: 2007-08-13 18:10:00 +09:00
16
+ library_group_id: 1
17
+ call_number_delimiter: "|"
18
+ position: 1
19
+ library_00002:
20
+ name: kamata
21
+ short_display_name: 蒲田
22
+ display_name: Kamata Library
23
+ fax_number: ""
24
+ updated_at: 2007-08-31 00:18:06.662349 +09:00
25
+ telephone_number_1: 81-3-3732-5111
26
+ telephone_number_2: ""
27
+ id: 2
28
+ zip_code: 144-8535
29
+ region: Tokyo
30
+ locality:
31
+ street:
32
+ created_at: 2007-08-13 18:10:00 +09:00
33
+ library_group_id: 1
34
+ call_number_delimiter: "|"
35
+ position: 2
36
+ isil: "JP-0000000"
37
+ library_00003:
38
+ name: hachioji
39
+ short_display_name: 八王子
40
+ display_name: Hachioji Library
41
+ fax_number: 042-637-2116
42
+ updated_at: 2007-08-31 00:18:16.188285 +09:00
43
+ telephone_number_1: 042-637-2033
44
+ telephone_number_2: ""
45
+ id: 3
46
+ zip_code: 192-0982
47
+ region: Tokyo
48
+ locality: Hachioji
49
+ street:
50
+ created_at: 2007-08-14 16:37:00 +09:00
51
+ library_group_id: 1
52
+ call_number_delimiter: "|"
53
+ position: 3
54
+ library_00004:
55
+ name: mita
56
+ short_display_name: 三田
57
+ display_name: Mita Library
58
+ fax_number: ""
59
+ updated_at: 2007-08-31 00:18:20.043951 +09:00
60
+ telephone_number_1: ""
61
+ telephone_number_2: ""
62
+ id: 4
63
+ zip_code: 108-8345
64
+ region: Tokyo
65
+ locality: Minato
66
+ street:
67
+ created_at: 2007-08-23 19:51:00 +09:00
68
+ library_group_id: 1
69
+ call_number_delimiter: "|"
70
+ position: 4
71
+
72
+ # == Schema Information
73
+ #
74
+ # Table name: libraries
75
+ #
76
+ # id :integer not null, primary key
77
+ # name :string(255) not null
78
+ # display_name :text
79
+ # short_display_name :string(255) not null
80
+ # zip_code :string(255)
81
+ # street :text
82
+ # locality :text
83
+ # region :text
84
+ # telephone_number_1 :string(255)
85
+ # telephone_number_2 :string(255)
86
+ # fax_number :string(255)
87
+ # note :text
88
+ # call_number_rows :integer default(1), not null
89
+ # call_number_delimiter :string(255) default("|"), not null
90
+ # library_group_id :integer default(1), not null
91
+ # users_count :integer default(0), not null
92
+ # position :integer
93
+ # country_id :integer
94
+ # created_at :datetime
95
+ # updated_at :datetime
96
+ # deleted_at :datetime
97
+ # opening_hour :text
98
+ # latitude :float
99
+ # longitude :float
100
+ # calil_systemid :string(255)
101
+ # calil_neighborhood_systemid :text
102
+ #
103
+
@@ -5,28 +5,31 @@ one:
5
5
  display_name: unknown
6
6
  short_name: unknown
7
7
  note:
8
- my_networks: 0.0.0.0/0
8
+ my_networks: "0.0.0.0/0\r\n\
9
+ ::/0"
9
10
  url: "http://localhost:3000/"
10
-
11
+ position: 1
12
+ login_banner: "*Next-L Enju*"
13
+ admin_networks: "0.0.0.0/0\r\n\
14
+ ::/0"
15
+ user_id: 1
11
16
 
12
17
  # == Schema Information
13
18
  #
14
19
  # Table name: library_groups
15
20
  #
16
- # id :integer not null, primary key
17
- # name :string(255) not null
18
- # display_name :text
19
- # short_name :string(255) not null
20
- # my_networks :text
21
- # login_banner :text
22
- # note :text
23
- # post_to_union_catalog :boolean default(FALSE), not null
24
- # country_id :integer
25
- # created_at :datetime
26
- # updated_at :datetime
27
- # admin_networks :text
28
- # allow_bookmark_external_url :boolean default(FALSE), not null
29
- # position :integer
30
- # url :string(255) default("http://localhost:3000/")
21
+ # id :integer not null, primary key
22
+ # name :string not null
23
+ # display_name :text
24
+ # short_name :string not null
25
+ # my_networks :text
26
+ # login_banner :text
27
+ # note :text
28
+ # country_id :integer
29
+ # position :integer
30
+ # created_at :datetime
31
+ # updated_at :datetime
32
+ # admin_networks :text
33
+ # url :string default("http://localhost:3000/")
34
+ # settings :text
31
35
  #
32
-
@@ -66,25 +66,24 @@ four:
66
66
  #
67
67
  # id :integer not null, primary key
68
68
  # user_id :integer
69
- # operation :string(255) default("searchRetrieve")
69
+ # operation :string default("searchRetrieve")
70
70
  # sru_version :float default(1.2)
71
- # query :string(255)
71
+ # query :string
72
72
  # start_record :integer
73
73
  # maximum_records :integer
74
- # record_packing :string(255)
75
- # record_schema :string(255)
74
+ # record_packing :string
75
+ # record_schema :string
76
76
  # result_set_ttl :integer
77
- # stylesheet :string(255)
78
- # extra_request_data :string(255)
77
+ # stylesheet :string
78
+ # extra_request_data :string
79
79
  # number_of_records :integer default(0)
80
- # result_set_id :string(255)
80
+ # result_set_id :string
81
81
  # result_set_idle_time :integer
82
82
  # records :text
83
83
  # next_record_position :integer
84
84
  # diagnostics :text
85
85
  # extra_response_data :text
86
86
  # echoed_search_retrieve_request :text
87
- # created_at :datetime not null
88
- # updated_at :datetime not null
87
+ # created_at :datetime
88
+ # updated_at :datetime
89
89
  #
90
-
@@ -0,0 +1,44 @@
1
+ ---
2
+ user_group_00001:
3
+ name: not_specified
4
+ display_name: (not specified)
5
+ updated_at: 2007-12-13 21:00:51.564542 +09:00
6
+ id: 1
7
+ note: ""
8
+ created_at: 2007-12-13 21:00:01.674976 +09:00
9
+ position: 1
10
+ valid_period_for_new_user: 0
11
+ user_group_00002:
12
+ name: user
13
+ display_name: User
14
+ updated_at: 2007-12-23 03:14:56.836548 +09:00
15
+ id: 2
16
+ note: ""
17
+ created_at: 2007-12-23 03:14:40.173954 +09:00
18
+ position: 2
19
+ valid_period_for_new_user: 365
20
+ user_group_00003:
21
+ name: faculty
22
+ display_name: Faculty
23
+ updated_at: 2007-12-23 03:15:05.134351 +09:00
24
+ id: 3
25
+ note: ""
26
+ created_at: 2007-12-23 03:15:05.126457 +09:00
27
+ position: 3
28
+ valid_period_for_new_user: 730
29
+
30
+ # == Schema Information
31
+ #
32
+ # Table name: user_groups
33
+ #
34
+ # id :integer not null, primary key
35
+ # name :string
36
+ # display_name :text
37
+ # note :text
38
+ # position :integer
39
+ # created_at :datetime
40
+ # updated_at :datetime
41
+ # deleted_at :datetime
42
+ # valid_period_for_new_user :integer default(0), not null
43
+ # expired_at :datetime
44
+ #
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  describe SearchHistory do
5
4
  fixtures :all
@@ -31,25 +30,24 @@ end
31
30
  #
32
31
  # id :integer not null, primary key
33
32
  # user_id :integer
34
- # operation :string(255) default("searchRetrieve")
33
+ # operation :string default("searchRetrieve")
35
34
  # sru_version :float default(1.2)
36
- # query :string(255)
35
+ # query :string
37
36
  # start_record :integer
38
37
  # maximum_records :integer
39
- # record_packing :string(255)
40
- # record_schema :string(255)
38
+ # record_packing :string
39
+ # record_schema :string
41
40
  # result_set_ttl :integer
42
- # stylesheet :string(255)
43
- # extra_request_data :string(255)
41
+ # stylesheet :string
42
+ # extra_request_data :string
44
43
  # number_of_records :integer default(0)
45
- # result_set_id :string(255)
44
+ # result_set_id :string
46
45
  # result_set_idle_time :integer
47
46
  # records :text
48
47
  # next_record_position :integer
49
48
  # diagnostics :text
50
49
  # extra_response_data :text
51
50
  # echoed_search_retrieve_request :text
52
- # created_at :datetime not null
53
- # updated_at :datetime not null
51
+ # created_at :datetime
52
+ # updated_at :datetime
54
53
  #
55
-
@@ -0,0 +1,74 @@
1
+ require 'rails_helper'
2
+
3
+ describe User do
4
+ #pending "add some examples to (or delete) #{__FILE__}"
5
+ fixtures :all
6
+
7
+ describe ".export" do
8
+ it "should export all user's information" do
9
+ lines = User.export
10
+ CSV.parse(lines, col_sep: "\t")
11
+ expect(lines).not_to be_empty
12
+ expect(lines.split(/\n/).size).to eq User.count + 1
13
+ end
14
+
15
+ it "should export save_search_history" do
16
+ user = FactoryGirl.create(:user,
17
+ profile: FactoryGirl.create(:profile,
18
+ save_search_history: true))
19
+ lines = User.export
20
+ rows = CSV.new(lines, col_sep: "\t", headers: true)
21
+ rows.each do |row|
22
+ if row["username"] == user.username
23
+ expect(row["save_search_history"]).to eq "true"
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+ # == Schema Information
31
+ #
32
+ # Table name: users
33
+ #
34
+ # id :integer not null, primary key
35
+ # email :string(255) default(""), not null
36
+ # encrypted_password :string(255) default(""), not null
37
+ # reset_password_token :string(255)
38
+ # reset_password_sent_at :datetime
39
+ # remember_created_at :datetime
40
+ # sign_in_count :integer default(0)
41
+ # current_sign_in_at :datetime
42
+ # last_sign_in_at :datetime
43
+ # current_sign_in_ip :string(255)
44
+ # last_sign_in_ip :string(255)
45
+ # password_salt :string(255)
46
+ # confirmation_token :string(255)
47
+ # confirmed_at :datetime
48
+ # confirmation_sent_at :datetime
49
+ # unconfirmed_email :string(255)
50
+ # failed_attempts :integer default(0)
51
+ # unlock_token :string(255)
52
+ # locked_at :datetime
53
+ # authentication_token :string(255)
54
+ # created_at :datetime not null
55
+ # updated_at :datetime not null
56
+ # deleted_at :datetime
57
+ # username :string(255) not null
58
+ # library_id :integer default(1), not null
59
+ # user_group_id :integer default(1), not null
60
+ # expired_at :datetime
61
+ # required_role_id :integer default(1), not null
62
+ # note :text
63
+ # keyword_list :text
64
+ # user_number :string(255)
65
+ # state :string(255)
66
+ # locale :string(255)
67
+ # enju_access_key :string(255)
68
+ # save_checkout_history :boolean default(FALSE), not null
69
+ # checkout_icalendar_token :string(255)
70
+ # share_bookmarks :boolean
71
+ # save_search_history :boolean default(FALSE), not null
72
+ # answer_feed_token :string(255)
73
+ #
74
+
@@ -0,0 +1,80 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+ SimpleCov.start 'rails'
4
+ Coveralls.wear!
5
+
6
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
7
+ ENV['RAILS_ENV'] ||= 'test'
8
+ require File.expand_path('../../spec/dummy/config/environment', __FILE__)
9
+ # Prevent database truncation if the environment is production
10
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
11
+ require 'spec_helper'
12
+ require 'rspec/rails'
13
+ # Add additional requires below this line. Rails is not loaded until this point!
14
+ require 'factory_girl'
15
+ require 'sunspot-rails-tester'
16
+ require 'rspec/active_model/mocks'
17
+ require 'pundit/rspec'
18
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
19
+
20
+ # Requires supporting ruby files with custom matchers and macros, etc, in
21
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
22
+ # run as spec files by default. This means that files in spec/support that end
23
+ # in _spec.rb will both be required and run as specs, causing the specs to be
24
+ # run twice. It is recommended that you do not name files matching this glob to
25
+ # end with _spec.rb. You can configure this pattern with the --pattern
26
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
27
+ #
28
+ # The following line is provided for convenience purposes. It has the downside
29
+ # of increasing the boot-up time by auto-requiring all files in the support
30
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
31
+ # require only the support files necessary.
32
+ #
33
+ # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
34
+
35
+ # Checks for pending migrations before tests are run.
36
+ # If you are not using ActiveRecord, you can remove this line.
37
+ ActiveRecord::Migration.maintain_test_schema! if Rails::VERSION::MAJOR >= 4
38
+
39
+ RSpec.configure do |config|
40
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
41
+ config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
42
+
43
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
44
+ # examples within a transaction, remove the following line or assign false
45
+ # instead of true.
46
+ config.use_transactional_fixtures = true
47
+
48
+ # RSpec Rails can automatically mix in different behaviours to your tests
49
+ # based on their file location, for example enabling you to call `get` and
50
+ # `post` in specs under `spec/controllers`.
51
+ #
52
+ # You can disable this behaviour by removing the line below, and instead
53
+ # explicitly tag your specs with their type, e.g.:
54
+ #
55
+ # RSpec.describe UsersController, :type => :controller do
56
+ # # ...
57
+ # end
58
+ #
59
+ # The different available types are documented in the features, such as in
60
+ # https://relishapp.com/rspec/rspec-rails/docs
61
+ config.infer_spec_type_from_file_location!
62
+
63
+ config.extend ControllerMacros, type: :controller
64
+
65
+ $original_sunspot_session = Sunspot.session
66
+
67
+ config.before do
68
+ Sunspot.session = Sunspot::Rails::StubSessionProxy.new($original_sunspot_session)
69
+ end
70
+
71
+ config.before :each, :solr => true do
72
+ Sunspot::Rails::Tester.start_original_sunspot_session
73
+ Sunspot.session = $original_sunspot_session
74
+ Sunspot.remove_all!
75
+ end
76
+ end
77
+
78
+ FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
79
+ FactoryGirl.find_definitions
80
+
data/spec/spec_helper.rb CHANGED
@@ -1,40 +1,92 @@
1
- require 'simplecov'
2
- require 'coveralls'
3
- SimpleCov.start 'rails'
4
- Coveralls.wear!
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
5
33
 
6
- # This file is copied to spec/ when you run 'rails generate rspec:install'
7
- ENV["RAILS_ENV"] ||= 'test'
8
- require File.expand_path("../dummy/config/environment", __FILE__)
9
- require 'rspec/rails'
10
- require 'factory_girl'
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = false
41
+ end
11
42
 
12
- # Requires supporting ruby files with custom matchers and macros, etc,
13
- # in spec/support/ and its subdirectories.
14
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
15
52
 
16
- RSpec.configure do |config|
17
- # == Mock Framework
18
- #
19
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
20
- #
21
- # config.mock_with :mocha
22
- # config.mock_with :flexmock
23
- # config.mock_with :rr
24
- config.mock_with :rspec
25
-
26
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
27
- config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
28
-
29
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
30
- # examples within a transaction, remove the following line or assign false
31
- # instead of true.
32
- config.use_transactional_fixtures = true
33
-
34
- config.extend ControllerMacros, :type => :controller
35
-
36
- config.infer_spec_type_from_file_location!
37
- end
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
63
+ config.disable_monkey_patching!
38
64
 
39
- FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
40
- FactoryGirl.find_definitions
65
+ # Many RSpec users commonly either run the entire suite or an individual
66
+ # file, and it's useful to allow more verbose output when running an
67
+ # individual spec file.
68
+ if config.files_to_run.one?
69
+ # Use the documentation formatter for detailed output,
70
+ # unless a formatter has already been configured
71
+ # (e.g. via a command-line flag).
72
+ config.default_formatter = 'doc'
73
+ end
74
+
75
+ # Print the 10 slowest examples and example groups at the
76
+ # end of the spec run, to help surface which specs are running
77
+ # particularly slow.
78
+ config.profile_examples = 10
79
+
80
+ # Run specs in random order to surface order dependencies. If you find an
81
+ # order dependency and want to debug it, you can fix the order by providing
82
+ # the seed, which is printed after each run.
83
+ # --seed 1234
84
+ config.order = :random
85
+
86
+ # Seed global randomization in this process using the `--seed` CLI option.
87
+ # Setting this allows you to use `--seed` to deterministically reproduce
88
+ # test failures related to randomization by passing the same `--seed` value
89
+ # as the one that triggered the failure.
90
+ Kernel.srand config.seed
91
+ =end
92
+ end
@@ -1,4 +1,4 @@
1
1
  RSpec.configure do |config|
2
- config.include Devise::TestHelpers, :type => :controller
3
- config.include Devise::TestHelpers, :type => :view
2
+ config.include Devise::Test::ControllerHelpers, type: :controller
3
+ config.include Devise::Test::ControllerHelpers, type: :view
4
4
  end