spree_dev_tools 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5f30a00bba4fa3f37fb19e03333da1dba8bf8dbff7e4d30b92e02659dbc03b5
4
- data.tar.gz: 5f629cf20585eba5d8c685f29a95c7d693179c5b367ef572edafcdadbcd9a166
3
+ metadata.gz: bfaa0389c9d81ca9382373459e7661f78edc057e26823a7a550cbaea55599026
4
+ data.tar.gz: 9bc504081c1d5b3b100c7929d8539ef161905d55466a739aee23c879a485a028
5
5
  SHA512:
6
- metadata.gz: 3f0977dc5d600f83879a873395854b2f53621de51acae74f5ccb97f5ac1b9f0f6ea10c29d27bec58ec71cf176938f3d1ddf48efe0d2b9645b1bfc067aa4283bf
7
- data.tar.gz: 74fd4d15ad566f86bc9361d7c7741307f58f2b65bb433ed2eb426ea47ab95d000e8769b1837996921a1bcc000ff8b3924d5258a59c05a01627044fe5b42bdec3
6
+ metadata.gz: 12d4a9ef9cd6b486bbbc406e1db822e949f807ec807f64a472859c7d6f2363f9a8bf10f9d74360dfebf86f2466b4f7eff89ad7125e302d3ace6879eac5fb24f4
7
+ data.tar.gz: fe36f0ab6aa37aeebafb7bfa620b7bf961137ed7d09eeb720ddb8d3195a8a406e88aa1eeccda741f70938eb0727f524ad5b7195a9cee41639e3a2b14f48db3e9
@@ -1,14 +1,4 @@
1
1
  # Run Coverage report
2
- require 'simplecov'
3
- SimpleCov.start do
4
- add_group 'Controllers', 'app/controllers'
5
- add_group 'Helpers', 'app/helpers'
6
- add_group 'Mailers', 'app/mailers'
7
- add_group 'Models', 'app/models'
8
- add_group 'Views', 'app/views'
9
- add_group 'Libraries', 'lib/spree'
10
- end
11
-
12
2
  require 'rspec/rails'
13
3
  require 'rspec/retry'
14
4
  require 'ffaker'
@@ -18,73 +8,10 @@ require 'pry'
18
8
  # in spec/support/ and its subdirectories.
19
9
  Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].sort.each { |f| require f }
20
10
 
21
- # Requires factories and other useful helpers defined in spree_core.
22
- require 'spree/testing_support/authorization_helpers'
23
- require 'spree/testing_support/capybara_ext'
24
- require 'spree/testing_support/factories'
25
- require 'spree/testing_support/preferences'
26
- require 'spree/testing_support/controller_requests'
27
- require 'spree/testing_support/flash'
28
- require 'spree/testing_support/url_helpers'
29
- require 'spree/testing_support/order_walkthrough'
30
- require 'spree/testing_support/auth_helpers'
31
- require 'spree/testing_support/checkout_helpers'
32
- require 'spree/testing_support/caching'
33
-
34
- # API v2 helpers
35
- require 'spree/api/testing_support/v2/base'
36
- require 'spree/api/testing_support/v2/current_order'
37
-
38
- if defined?(Warden)
39
- include Warden::Test::Helpers
40
- Warden.test_mode!
41
- end
42
-
43
11
  RSpec.configure do |config|
44
12
  # Infer an example group's spec type from the file location.
45
13
  config.infer_spec_type_from_file_location!
46
14
 
47
- # == URL Helpers
48
- #
49
- # Allows access to Spree's routes in specs:
50
- #
51
- # visit spree.admin_path
52
- # current_path.should eql(spree.products_path)
53
- config.include Spree::TestingSupport::UrlHelpers
54
-
55
- # == Requests support
56
- #
57
- # Adds convenient methods to request Spree's controllers
58
- # spree_get :index
59
- config.include Spree::TestingSupport::ControllerRequests, type: :controller
60
-
61
- config.include Spree::TestingSupport::Preferences
62
- config.include Spree::TestingSupport::Flash
63
-
64
- config.include Spree::TestingSupport::AuthHelpers, type: :feature
65
- config.include Spree::TestingSupport::CheckoutHelpers, type: :feature
66
-
67
- config.before :each do
68
- Rails.cache.clear
69
- reset_spree_preferences do |config|
70
- # config.my_custom_preference = 10
71
- end
72
- create(:store)
73
- end
74
-
75
- if defined?(Devise)
76
- config.before(:each, type: :controller) do
77
- @request.env['devise.mapping'] = Devise.mappings[:spree_user]
78
- end
79
-
80
- config.include Devise::Test::ControllerHelpers, type: :controller
81
-
82
- config.include Warden::Test::Helpers
83
- config.before :suite do
84
- Warden.test_mode!
85
- end
86
- end
87
-
88
15
  # == Mock Framework
89
16
  #
90
17
  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
@@ -108,4 +35,8 @@ RSpec.configure do |config|
108
35
  config.verbose_retry = true
109
36
  # show exception that triggers a retry if verbose_retry is set to true
110
37
  config.display_try_failure_messages = true
38
+
39
+ config.around :each, :js do |ex|
40
+ ex.run_with_retry retry: 3
41
+ end
111
42
  end
@@ -0,0 +1,19 @@
1
+ if defined?(Warden)
2
+ include Warden::Test::Helpers
3
+ Warden.test_mode!
4
+ end
5
+
6
+ if defined?(Devise)
7
+ RSpec.configure do |config|
8
+ config.before(:each, type: :controller) do
9
+ @request.env['devise.mapping'] = Devise.mappings[:spree_user]
10
+ end
11
+
12
+ config.include Devise::Test::ControllerHelpers, type: :controller
13
+
14
+ config.include Warden::Test::Helpers
15
+ config.before :suite do
16
+ Warden.test_mode!
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,10 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start do
4
+ add_group 'Controllers', 'app/controllers'
5
+ add_group 'Helpers', 'app/helpers'
6
+ add_group 'Mailers', 'app/mailers'
7
+ add_group 'Models', 'app/models'
8
+ add_group 'Views', 'app/views'
9
+ add_group 'Libraries', 'lib/spree'
10
+ end
@@ -0,0 +1,49 @@
1
+ # Requires factories and other useful helpers defined in spree_core.
2
+ require 'spree/testing_support/authorization_helpers'
3
+ require 'spree/testing_support/capybara_ext'
4
+ require 'spree/testing_support/factories'
5
+ require 'spree/testing_support/preferences'
6
+ require 'spree/testing_support/controller_requests'
7
+ require 'spree/testing_support/flash'
8
+ require 'spree/testing_support/url_helpers'
9
+ require 'spree/testing_support/order_walkthrough'
10
+ require 'spree/testing_support/auth_helpers'
11
+ require 'spree/testing_support/checkout_helpers'
12
+ require 'spree/testing_support/caching'
13
+
14
+ # API v2 helpers
15
+ require 'spree/api/testing_support/v2/base'
16
+ require 'spree/api/testing_support/v2/current_order'
17
+
18
+ RSpec.configure do |config|
19
+ # Infer an example group's spec type from the file location.
20
+ config.infer_spec_type_from_file_location!
21
+
22
+ # == URL Helpers
23
+ #
24
+ # Allows access to Spree's routes in specs:
25
+ #
26
+ # visit spree.admin_path
27
+ # current_path.should eql(spree.products_path)
28
+ config.include Spree::TestingSupport::UrlHelpers
29
+
30
+ # == Requests support
31
+ #
32
+ # Adds convenient methods to request Spree's controllers
33
+ # spree_get :index
34
+ config.include Spree::TestingSupport::ControllerRequests, type: :controller
35
+
36
+ config.include Spree::TestingSupport::Preferences
37
+ config.include Spree::TestingSupport::Flash
38
+
39
+ config.include Spree::TestingSupport::AuthHelpers, type: :feature
40
+ config.include Spree::TestingSupport::CheckoutHelpers, type: :feature
41
+
42
+ config.before :each do
43
+ Rails.cache.clear
44
+ reset_spree_preferences do |config|
45
+ # config.my_custom_preference = 10
46
+ end
47
+ create(:store)
48
+ end
49
+ end
@@ -10,7 +10,7 @@ module SpreeDevTools
10
10
  module VERSION
11
11
  MAJOR = 0
12
12
  MINOR = 0
13
- TINY = 8
13
+ TINY = 9
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_dev_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spark Solutions
@@ -308,7 +308,10 @@ files:
308
308
  - lib/spree_dev_tools/rspec/support/authentication_helpers.rb
309
309
  - lib/spree_dev_tools/rspec/support/capybara.rb
310
310
  - lib/spree_dev_tools/rspec/support/database_cleaner.rb
311
+ - lib/spree_dev_tools/rspec/support/devise.rb
311
312
  - lib/spree_dev_tools/rspec/support/factory_bot.rb
313
+ - lib/spree_dev_tools/rspec/support/simplecov.rb
314
+ - lib/spree_dev_tools/rspec/support/spree.rb
312
315
  - lib/spree_dev_tools/rspec/support/spree_cart.rb
313
316
  - lib/spree_dev_tools/version.rb
314
317
  - spree_dev_tools.gemspec