moto 0.7.4 → 0.7.5

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: a134696a7fcfb8f38e55cff7ea6fd5e76a6b87f2
4
- data.tar.gz: 1c3c9398c0e531d67e8c862c40c0dc14894466af
3
+ metadata.gz: 735b4b0d9c3ea1539334de684da64474601f1886
4
+ data.tar.gz: d02d96924f4abbcc01e2fd5cb1eee3f70d031700
5
5
  SHA512:
6
- metadata.gz: 79045453fb20134fed27c4960a4fac39f750676477033b341a9df37d38a77d2c7efcf0d1cb03faa60ff51a6cf6fef50a4f06947e6d267fd6a24308a2df863cff
7
- data.tar.gz: 7a49e3220e145ab805f7e5d4b3a1935cfc244a7c8e0be1ab5b53d5883d3ee16b802bebeaf02be1144baf842e650e0463f812bd6904e1b69aad339c2dff81c69f
6
+ metadata.gz: 3d1cc5f602cd1b3620707de05b593c5e0a59a66de6dec2b54522d1955fada13a2ae98ad42d828da897e592d3ae173d58b37f2071019c3bf323c9d4ce11be029d
7
+ data.tar.gz: 6bcbaa357e0b0e4ff4d78dde2dcb133c581ccddad080f27ec6385383b8db650fbbe5c727d2389229628bb47acdad8d3b075620560a33db761d0d17961aa02dc4
@@ -69,6 +69,7 @@ module Moto
69
69
  def register_chrome_driver
70
70
  Capybara.register_driver :chrome do |app|
71
71
  client = Selenium::WebDriver::Remote::Http::Default.new
72
+ client.timeout = 180
72
73
  Capybara::Selenium::Driver.new(app, browser: :chrome, http_client: client)
73
74
  end
74
75
  end
@@ -17,7 +17,7 @@ module Moto
17
17
  puts ''
18
18
  puts 'FAILURES: '
19
19
  run_status.tests_failed.each do |test_status|
20
- puts test_status.name
20
+ puts test_status.display_name
21
21
  puts "\t" + test_status.results.last.failures.join("\n\t")
22
22
  puts ''
23
23
  end
@@ -27,7 +27,7 @@ module Moto
27
27
  puts ''
28
28
  puts 'ERRORS: '
29
29
  run_status.tests_error.each do |test_status|
30
- puts test_status.name
30
+ puts test_status.display_name
31
31
  puts "\t" + test_status.results.last.message
32
32
  puts ''
33
33
  end
@@ -37,7 +37,7 @@ module Moto
37
37
  puts ''
38
38
  puts 'SKIPPED: '
39
39
  run_status.tests_skipped.each do |test_status|
40
- puts test_status.name
40
+ puts test_status.display_name
41
41
  puts "\t" + test_status.results.last.message
42
42
  puts ''
43
43
  end
@@ -47,10 +47,10 @@ module Moto
47
47
 
48
48
  def end_test(test_status)
49
49
  print case test_status.results.last.code
50
- when Moto::Test::Result::PASSED then '.'
51
- when Moto::Test::Result::FAILURE then 'F'
52
- when Moto::Test::Result::ERROR then 'E'
53
- when Moto::Test::Result::SKIPPED then 's'
50
+ when Moto::Test::Result::PASSED then '.'
51
+ when Moto::Test::Result::FAILURE then 'F'
52
+ when Moto::Test::Result::ERROR then 'E'
53
+ when Moto::Test::Result::SKIPPED then 's'
54
54
  end
55
55
  end
56
56
 
data/lib/test/base.rb CHANGED
@@ -34,6 +34,7 @@ module Moto
34
34
  @status = Moto::Test::Status.new
35
35
  @status.name = @name
36
36
  @status.test_class_name = self.class.name
37
+ @status.display_name = @status.test_class_name.split('::')[2..-2].join('::')
37
38
  @status.env = Moto::Lib::Config.environment
38
39
  end
39
40
 
@@ -101,14 +102,14 @@ module Moto
101
102
  end
102
103
 
103
104
  def skip(msg = nil)
104
- raise Exceptions::TestSkipped.new(msg.nil? ? 'Test skipped with no reason given.' : "Skip reason: #{msg}")
105
+ raise Exceptions::TestSkipped.new(msg.nil? ? 'Test skipped with no reason given.' : "Skipped: #{msg}")
105
106
  end
106
107
 
107
108
  def fail(msg = nil)
108
109
  if msg.nil?
109
110
  msg = 'Test forcibly failed with no reason given.'
110
111
  else
111
- msg = "Forced failure, reason: #{msg}"
112
+ msg = "Forced failure: #{msg}"
112
113
  end
113
114
  raise Exceptions::TestForcedFailure.new msg
114
115
  end
@@ -117,7 +118,7 @@ module Moto
117
118
  if msg.nil?
118
119
  msg = 'Test forcibly passed with no reason given.'
119
120
  else
120
- msg = "Forced passed, reason: #{msg}"
121
+ msg = "Forced passed: #{msg}"
121
122
  end
122
123
  raise Exceptions::TestForcedPassed.new msg
123
124
  end
data/lib/test/status.rb CHANGED
@@ -14,6 +14,9 @@ module Moto
14
14
  # Name of the class representing test
15
15
  attr_accessor :test_class_name
16
16
 
17
+ # Partially demodulized class name, used for display purposes
18
+ attr_accessor :display_name
19
+
17
20
  # Array of [Moto::Test::Result], each item represents a result of a single attempt to pass the test
18
21
  attr_reader :results
19
22
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Moto
2
- VERSION = '0.7.4'
2
+ VERSION = '0.7.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartek Wilczek
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-07-20 00:00:00.000000000 Z
14
+ date: 2016-07-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport