gaku_testing 0.1.1 → 0.2.0

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
  SHA1:
3
- metadata.gz: 8985d28e8b8e0b8c20ca27d04e7a5755b355c07e
4
- data.tar.gz: 24add0f0aad3bd3cc5b840a0b257e04033dc272d
3
+ metadata.gz: 04532b48ed9cf90a56352d2e32c5bfa6a49b39a5
4
+ data.tar.gz: 7889a6524799d1e162e48cef6c386a9a55f437af
5
5
  SHA512:
6
- metadata.gz: 331cb59f49071dd77ae925b66c9bc5695080a4999b06e09c8fd6d2f3249e479b81eb115cfa06e3d5cec6656682e54385720482f43573f966a0bfbea6f1f75177
7
- data.tar.gz: 78e6a5f7bb8dc696bec0ce6c8bab157cc8b969e288b2458d599564b52104343da95d0fdc7a26ac02087e8e1b0ae2767fb6cd1346198df58a235c5b4545d5ab45
6
+ metadata.gz: 620cd49876e3a43825d579f5d3f64ce38ebc63d88132be820a6fc8061298b442bf2e60dc01e9409ecfb02d3da17bcd3f9fe4fa70a63b7000b313872f1b9260ca
7
+ data.tar.gz: 0143f7da3836e1d5efaabe4f6d605c8a7084553b10516ebbec2ea214f9c2dd5e663908a1c3bc25c6331361cf258bc0f444d998958bc726b47b98b7a5b01f11a0
@@ -7,7 +7,7 @@ Capybara.default_wait_time = 5
7
7
  Capybara.default_driver = :rack_test
8
8
 
9
9
  Capybara.register_driver :poltergeist_debug do |app|
10
- Capybara::Poltergeist::Driver.new(app, :inspector => true, js_errors: false)
10
+ Capybara::Poltergeist::Driver.new(app, inspector: true, js_errors: false)
11
11
  end
12
12
 
13
13
  if ENV['SELENIUM']
@@ -16,4 +16,4 @@ elsif ENV['PHANTOM']
16
16
  Capybara.javascript_driver = :poltergeist_debug
17
17
  else
18
18
  Capybara.javascript_driver = :poltergeist_debug
19
- end
19
+ end
@@ -56,7 +56,6 @@ module Gaku::Testing::FeatureHelpers
56
56
  '.js-edit-link'
57
57
  end
58
58
 
59
-
60
59
  def recovery_link
61
60
  '.recovery-link'
62
61
  end
@@ -117,9 +116,7 @@ module Gaku::Testing::FeatureHelpers
117
116
  def wait_for_ajax(timeout = Capybara.default_wait_time)
118
117
  Timeout.timeout(timeout) do
119
118
  active = page.evaluate_script('jQuery.active')
120
- until active == 0
121
- active = page.evaluate_script('jQuery.active')
122
- end
119
+ active = page.evaluate_script('jQuery.active') until active == 0
123
120
  end
124
121
  end
125
122
 
@@ -132,7 +129,7 @@ module Gaku::Testing::FeatureHelpers
132
129
  within(count_div) { page.has_content? count }
133
130
  end
134
131
 
135
- def check_path(current_url,expected_path)
132
+ def check_path(current_url, expected_path)
136
133
  uri = URI.parse(current_url)
137
134
  "#{uri.path}?#{uri.query}".should == expected_path
138
135
  end
@@ -144,7 +141,7 @@ module Gaku::Testing::FeatureHelpers
144
141
  private
145
142
 
146
143
  def plural(text)
147
- a = []
144
+ # a = []
148
145
  a = text.split('-')
149
146
  p = a.last.pluralize
150
147
  result = a[0..-2] << p
@@ -156,4 +153,3 @@ end
156
153
  RSpec.configure do |config|
157
154
  config.include Gaku::Testing::FeatureHelpers, type: :feature
158
155
  end
159
-
@@ -32,4 +32,4 @@ end
32
32
 
33
33
  RSpec.configure do |config|
34
34
  config.include Gaku::Testing::FlashHelpers, type: :feature
35
- end
35
+ end
@@ -7,6 +7,7 @@ require 'database_cleaner'
7
7
  require 'active_record/fixtures'
8
8
  require 'factory_girl_rails'
9
9
  require 'ffaker'
10
+ require 'rspec/retry'
10
11
 
11
12
  require 'gaku/testing/env'
12
13
  require 'gaku/testing/factories'
@@ -15,13 +16,15 @@ require 'gaku/testing/flash_helpers'
15
16
  require 'gaku/testing/auth_helpers'
16
17
  require 'gaku/core/url_helpers'
17
18
 
18
-
19
- #require 'gaku/testing/support/features'
19
+ # require 'gaku/testing/support/features'
20
20
 
21
21
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
22
22
 
23
23
  RSpec.configure do |config|
24
24
 
25
+ config.verbose_retry = true
26
+ config.default_retry_count = 3
27
+
25
28
  config.before(:each) do
26
29
  if example.metadata[:js]
27
30
  DatabaseCleaner.strategy = :truncation
@@ -36,12 +39,12 @@ RSpec.configure do |config|
36
39
  DatabaseCleaner.clean
37
40
  end
38
41
 
39
-
40
42
  config.use_transactional_fixtures = false
41
43
  config.infer_base_class_for_anonymous_controllers = false
42
44
 
43
45
  config.fixture_path = "#{::Rails.root}/spec/fixtures"
44
46
  config.include FactoryGirl::Syntax::Methods
45
47
  config.include Gaku::Core::UrlHelpers
48
+ config.include HandyControllerHelpers::AllHelpers, type: :request
46
49
 
47
- end
50
+ end
@@ -7,6 +7,10 @@ RSpec.configure do |config|
7
7
  config.mock_with :rspec
8
8
  config.order = 'random'
9
9
 
10
+ config.before(:each) do
11
+ $redis.flushdb
12
+ end
13
+
10
14
  config.before(:all) do
11
15
  DeferredGarbageCollection.start
12
16
  end
@@ -14,4 +18,4 @@ RSpec.configure do |config|
14
18
  config.after(:all) do
15
19
  DeferredGarbageCollection.reconsider
16
20
  end
17
- end
21
+ end
@@ -3,7 +3,7 @@ require_relative 'spec_helper_base'
3
3
  require 'rspec/core'
4
4
  require 'rspec/rails/extensions'
5
5
  require 'rspec/rails/adapters'
6
- #require 'rspec/rails/mocks'
6
+ # require 'rspec/rails/mocks'
7
7
  require 'rspec/rails/view_rendering'
8
8
  require 'rspec/rails/example'
9
9
 
@@ -17,12 +17,12 @@ require 'gaku/testing/controller_helpers'
17
17
  require 'gaku/testing/auth_helpers'
18
18
  require 'gaku/core/url_helpers'
19
19
 
20
- #require 'gaku/testing/support/controllers'
20
+ # require 'gaku/testing/support/controllers'
21
21
 
22
22
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
23
23
 
24
-
25
24
  RSpec.configure do |config|
25
+
26
26
  config.before(:suite) do
27
27
  DatabaseCleaner.strategy = :transaction
28
28
  DatabaseCleaner.clean_with(:truncation)
@@ -42,4 +42,4 @@ RSpec.configure do |config|
42
42
  config.include Gaku::Core::UrlHelpers
43
43
 
44
44
  config.alias_it_should_behave_like_to :ensures, 'ensures'
45
- end
45
+ end
@@ -35,4 +35,4 @@ RSpec.configure do |config|
35
35
  config.include FactoryGirl::Syntax::Methods
36
36
  config.include Paperclip::Shoulda::Matchers
37
37
 
38
- end
38
+ end
@@ -1 +1 @@
1
- require 'gaku/testing'
1
+ require 'gaku/testing'
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaku_testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
8
+ - Georgi Tapalilov
8
9
  - Nakaya Yukiharu
9
10
  - Vassil Kalkov
10
- - Georgi Tapalilov
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-02-24 00:00:00.000000000 Z
14
+ date: 2015-02-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: gaku_core
@@ -19,33 +19,35 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.1.1
22
+ version: 0.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.1.1
30
- description: Testing helpers used in other engines
31
- email: info@genshin.org
29
+ version: 0.2.0
30
+ description: Testing helpers used in other engines/modules for GAKU Engine.
31
+ email: info@gakuengine.com
32
32
  executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - lib/gaku/testing.rb
37
- - lib/gaku/testing/flash_helpers.rb
38
- - lib/gaku/testing/spec_helpers/spec_helper_models.rb
39
- - lib/gaku/testing/spec_helpers/spec_helper_routing.rb
40
- - lib/gaku/testing/spec_helpers/spec_helper_controllers.rb
41
- - lib/gaku/testing/spec_helpers/spec_helper.rb
42
- - lib/gaku/testing/spec_helpers/spec_helper_base.rb
43
37
  - lib/gaku/testing/engine.rb
44
38
  - lib/gaku/testing/env.rb
45
39
  - lib/gaku/testing/feature_helpers.rb
40
+ - lib/gaku/testing/flash_helpers.rb
41
+ - lib/gaku/testing/spec_helpers/spec_helper.rb
42
+ - lib/gaku/testing/spec_helpers/spec_helper_base.rb
43
+ - lib/gaku/testing/spec_helpers/spec_helper_controllers.rb
44
+ - lib/gaku/testing/spec_helpers/spec_helper_models.rb
45
+ - lib/gaku/testing/spec_helpers/spec_helper_routing.rb
46
46
  - lib/gaku_testing.rb
47
- homepage: http://github.com/Genshin/gaku
48
- licenses: []
47
+ homepage: http://www.gakuengine.com
48
+ licenses:
49
+ - GPL-3.0
50
+ - AGPL-3.0
49
51
  metadata: {}
50
52
  post_install_message:
51
53
  rdoc_options: []
@@ -53,17 +55,17 @@ require_paths:
53
55
  - lib
54
56
  required_ruby_version: !ruby/object:Gem::Requirement
55
57
  requirements:
56
- - - ~>
58
+ - - ">="
57
59
  - !ruby/object:Gem::Version
58
- version: 2.0.0
60
+ version: 2.1.3
59
61
  required_rubygems_version: !ruby/object:Gem::Requirement
60
62
  requirements:
61
- - - '>='
63
+ - - ">="
62
64
  - !ruby/object:Gem::Version
63
65
  version: '0'
64
66
  requirements: []
65
67
  rubyforge_project:
66
- rubygems_version: 2.1.11
68
+ rubygems_version: 2.4.5
67
69
  signing_key:
68
70
  specification_version: 4
69
71
  summary: Shared testing helpers for GAKU Engine