lazyman 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -42,6 +42,23 @@ Lazyman go command supports all the rspec options and it is the recommend way.
42
42
 
43
43
  You can find test report in app/reports folder. It is a html file with current time stamp.
44
44
 
45
+ Using Console
46
+ -------------
47
+ You can use eat console to debug your test in irb.
48
+
49
+ cd your_project_name
50
+ lazyman c
51
+
52
+ Lazyman will load all your pages, start irb and open browser which was defined in your config.yml.
53
+
54
+ Then you can use $navi variable the same way in your test file.
55
+
56
+ p = $navi.goto_baidu_page
57
+ p.keyword="watir-webdriver"
58
+ p.search_element.click
59
+
60
+ You can type everything just like you are write a text case.
61
+
45
62
  Understand lazyman project structure
46
63
  ------------------------------------
47
64
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lazyman.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "lazyman"
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["easonhan"]
@@ -71,7 +71,8 @@ Gem::Specification.new do |s|
71
71
  "spec/lazy_page_spec.rb",
72
72
  "spec/pages/components/footer.rb",
73
73
  "spec/pages/test_page.rb",
74
- "spec/spec_helper.rb"
74
+ "spec/spec_helper.rb",
75
+ "spec/string_spec.rb"
75
76
  ]
76
77
  s.homepage = "https://github.com/easonhan007/lazyman"
77
78
  s.licenses = ["MIT"]
@@ -2,9 +2,11 @@ class String
2
2
  def lazy_to_hash
3
3
  hash = { }
4
4
  return hash if self.empty?
5
- self.split(',').map { |i| i.strip }.each do |key|
5
+ arr = self.split(',').map { |i| i.strip }
6
+ arr.each do |key|
6
7
  hash[key.to_sym] = true
7
8
  end #each
9
+ hash
8
10
  end
9
11
 
10
12
  end
@@ -15,13 +15,20 @@ $:.unshift(File.expand_path File.join('.'))
15
15
 
16
16
  RSpec.configure do |c|
17
17
  c.treat_symbols_as_metadata_keys_with_true_values = true
18
+ c.run_all_when_everything_filtered = true
19
+ c.alias_example_to :case
20
+ c.alias_it_should_behave_like_to :include_shared
18
21
 
19
22
  unless($config.tags.empty?)
20
- tags = $config.tags.lazy_to_hash
23
+ tags = case
24
+ when String
25
+ $config.tags.lazy_to_hash
26
+ when Hash
27
+ $config.tags
28
+ end #case
29
+ c.filter_run tags
21
30
  end
22
31
 
23
- c.filter_run tags
24
-
25
32
  def test_data file
26
33
  content = ''
27
34
  file_path = File.expand_path(File.join('.', 'app', 'test_data', "#{file}.yml"))
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe String do
4
+
5
+ it 'lazy_to_hash should have correct behavor' do
6
+ str = 'a, b, c, d'
7
+ str.lazy_to_hash.should eq({a: true, b: true, c: true, d: true})
8
+ end
9
+
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazyman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-04-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &26888076 !ruby/object:Gem::Requirement
16
+ requirement: &26812656 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.13.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26888076
24
+ version_requirements: *26812656
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: page-object
27
- requirement: &26887752 !ruby/object:Gem::Requirement
27
+ requirement: &26812320 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.8.6.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *26887752
35
+ version_requirements: *26812320
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thor
38
- requirement: &26887416 !ruby/object:Gem::Requirement
38
+ requirement: &26811840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.14.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *26887416
46
+ version_requirements: *26811840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: active_support
49
- requirement: &26887116 !ruby/object:Gem::Requirement
49
+ requirement: &26811468 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 3.0.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *26887116
57
+ version_requirements: *26811468
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rdoc
60
- requirement: &26886792 !ruby/object:Gem::Requirement
60
+ requirement: &26811132 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '3.12'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *26886792
68
+ version_requirements: *26811132
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &26886432 !ruby/object:Gem::Requirement
71
+ requirement: &26810796 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *26886432
79
+ version_requirements: *26810796
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &26886144 !ruby/object:Gem::Requirement
82
+ requirement: &26810400 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.8.4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *26886144
90
+ version_requirements: *26810400
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rspec
93
- requirement: &26885784 !ruby/object:Gem::Requirement
93
+ requirement: &26810064 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 2.13.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *26885784
101
+ version_requirements: *26810064
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: page-object
104
- requirement: &26885400 !ruby/object:Gem::Requirement
104
+ requirement: &26809704 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.8.6.1
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *26885400
112
+ version_requirements: *26809704
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: thor
115
- requirement: &26885052 !ruby/object:Gem::Requirement
115
+ requirement: &26809356 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.14.6
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *26885052
123
+ version_requirements: *26809356
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: active_support
126
- requirement: &26884752 !ruby/object:Gem::Requirement
126
+ requirement: &26809020 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: 3.0.0
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *26884752
134
+ version_requirements: *26809020
135
135
  description: A test framework using watir-webdriver rspec and page-object
136
136
  email: nbkhic@qq.com
137
137
  executables:
@@ -195,6 +195,7 @@ files:
195
195
  - spec/pages/components/footer.rb
196
196
  - spec/pages/test_page.rb
197
197
  - spec/spec_helper.rb
198
+ - spec/string_spec.rb
198
199
  homepage: https://github.com/easonhan007/lazyman
199
200
  licenses:
200
201
  - MIT
@@ -210,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
211
  version: '0'
211
212
  segments:
212
213
  - 0
213
- hash: -526333347
214
+ hash: 890707955
214
215
  required_rubygems_version: !ruby/object:Gem::Requirement
215
216
  none: false
216
217
  requirements: