taza 2.1.0 → 3.0.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: e293957e1c075d4d126ec7a5a66196fa70091511
4
- data.tar.gz: 30d3fc63bbf1fd3ff6a7efd4d1dd50146e3e632a
3
+ metadata.gz: d12a9c6651f8cbc0f3289757cea07418ab15b171
4
+ data.tar.gz: 4f5c1474c5ef876f360928f99ac38e3a57290485
5
5
  SHA512:
6
- metadata.gz: 58475aa00a5d5efd8f2ea0e70958e82c3de205846b9146c37604fa208dfc7bb27dfad19caf90c6958c72f705abbab2e93035fd90eb5ca5df9bceda8f8fe30e32
7
- data.tar.gz: cf7aada1dd2abb7ae75db85f28eecd01d2e556cfd96fa3ae149656999483f71954d59409a6a193d74f070ad273454666f569b8dd8e12948aae0ff898b8d64886
6
+ metadata.gz: e438aabe0ee4a4c0910aa480d583a849e601b8555e60fbc638de855f0b7586ab8cd812e37b6ba2583712a45c8aff8c2a64f8f87e427eca447543cda144a74071
7
+ data.tar.gz: 0b61da65715ca46c0419b37e0c2c9d6105245588649c0e75973ed535bc9717cdc33768f450036c85230bfeba558dbf13c03b09de19dd688a4aa1fbbb3295b2ae
@@ -1,6 +1,12 @@
1
1
  === master
2
2
 
3
+ == 3.0.0
3
4
  * Run builds against more versions of Ruby and ActiveSupport
5
+ * Increase the ActiveSupport dependency to 4.0.2+
6
+ * Replace firewatir and watir-webdriver with watir
7
+ * Drop support for Ruby 1.9.3
8
+ * Add support for Ruby 2.4 and 2.5
9
+
4
10
 
5
11
  === 1.0
6
12
  updated to RSpec 3 (thanks @drewboardman)
data/README.md CHANGED
@@ -44,9 +44,8 @@ Here's an example for starting a project around Google apps:
44
44
 
45
45
  ```
46
46
  $ taza create google
47
- $ cd google/
48
47
  $ taza site google
49
- $ taza page home_page google
48
+ $ taza page home google
50
49
  $ taza flow search google
51
50
  $ rake spec:isolation:google
52
51
  ```
@@ -7,10 +7,6 @@ require 'taza/settings'
7
7
  require 'taza/flow'
8
8
  require 'taza/entity'
9
9
  require 'taza/fixtures'
10
- require 'extensions/object'
11
- require 'extensions/string'
12
- require 'extensions/hash'
13
- require 'extensions/array'
14
10
  require 'formatters/failing_examples_formatter'
15
11
 
16
12
  #generators
@@ -17,14 +17,7 @@ module Taza
17
17
  private
18
18
 
19
19
  def self.create_watir(params)
20
- method = "watir_#{params[:browser]}"
21
- raise BrowserUnsupportedError unless self.respond_to?(method)
22
- watir = self.send(method,params)
23
- watir
24
- end
25
-
26
- def self.create_watir_webdriver(params)
27
- require 'watir-webdriver'
20
+ require 'watir'
28
21
  Watir::Browser.new(params[:browser])
29
22
  end
30
23
 
@@ -43,27 +36,6 @@ module Taza
43
36
  end
44
37
  Selenium::WebDriver.for params[:browser].to_sym
45
38
  end
46
-
47
- def self.watir_firefox(params)
48
- require 'firewatir'
49
- FireWatir::Firefox.new
50
- end
51
-
52
- def self.watir_safari(params)
53
- require 'safariwatir'
54
- Watir::Safari.new
55
- end
56
-
57
- def self.watir_ie(params)
58
- require 'watir'
59
- if params[:attach]
60
- browser = Watir::Browser.find(:title, //)
61
- end
62
- browser || Watir::Browser.new
63
- end
64
39
  end
65
-
66
- # We don't know how to create the browser you asked for
67
- class BrowserUnsupportedError < StandardError; end
68
40
  end
69
41
 
@@ -42,8 +42,7 @@ module Taza
42
42
  end
43
43
 
44
44
  def to_hash
45
- cloned_hash = @hash.clone
46
- cloned_hash.key_strings_to_symbols!
45
+ @hash.deep_symbolize_keys
47
46
  end
48
47
 
49
48
  private
@@ -1,6 +1,5 @@
1
1
  require 'find'
2
2
  require 'erb'
3
- require 'extensions/hash'
4
3
  require 'taza/entity'
5
4
 
6
5
  module Taza
@@ -28,7 +27,7 @@ module Taza
28
27
  templatized_fixture=ERB.new(File.read(file))
29
28
  entitized_fixture = {}
30
29
  YAML.load(templatized_fixture.result).each do |key, value|
31
- entitized_fixture[key] = value.convert_hash_keys_to_methods(self)
30
+ entitized_fixture[key] = Taza::Entity.new(value, self)
32
31
  end
33
32
  @fixtures[File.basename(file,'.yml').to_sym] = entitized_fixture
34
33
  end
@@ -109,11 +109,9 @@ module Taza
109
109
  end
110
110
 
111
111
  def add_element_method(params) # :nodoc:
112
- metaclass.class_eval do
113
- define_method(params[:element_name]) do |*args|
114
- check_filters(params)
115
- self.instance_exec(*args,&params[:element_block])
116
- end
112
+ define_singleton_method(params[:element_name]) do |*args|
113
+ check_filters(params)
114
+ self.instance_exec(*args, &params[:element_block])
117
115
  end
118
116
  end
119
117
 
@@ -1,3 +1,3 @@
1
1
  module Taza
2
- VERSION = "2.1.0"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -3,14 +3,14 @@ require 'spec_helper'
3
3
  describe Taza::FlowGenerator do
4
4
 
5
5
  before(:each) do
6
- capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site }
6
+ capture_stdout { Taza::SiteGenerator.new(['foo_site']).site }
7
7
  end
8
8
 
9
9
  context "taza flow checkout foo_site" do
10
10
  context "creates" do
11
11
 
12
12
  let(:subject) { Taza::FlowGenerator.new(['checkout', 'foo_site']) }
13
- let(:output) { capture(:stdout) { subject.flow } }
13
+ let(:output) { capture_stdout { subject.flow } }
14
14
 
15
15
  it 'a checkout.rb' do
16
16
  expect(output).to include('lib/sites/foo_site/flows/checkout.rb')
@@ -18,7 +18,7 @@ describe Taza::FlowGenerator do
18
18
  end
19
19
 
20
20
  it 'a message if site does not exist' do
21
- bar_page = capture(:stdout) { Taza::FlowGenerator.new(['checkout', 'bar_site']).flow }
21
+ bar_page = capture_stdout { Taza::FlowGenerator.new(['checkout', 'bar_site']).flow }
22
22
  expect(bar_page).to include("No such site bar_site exists")
23
23
  end
24
24
  end
@@ -4,14 +4,14 @@ describe Taza::PageGenerator do
4
4
  include Helpers::Taza
5
5
 
6
6
  before(:each) do
7
- capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site }
7
+ capture_stdout { Taza::SiteGenerator.new(['foo_site']).site }
8
8
  end
9
9
 
10
10
  context "taza page home foo_site" do
11
11
  context "creates" do
12
12
 
13
13
  let(:subject) { Taza::PageGenerator.new(['home', 'foo_site']) }
14
- let(:output) { capture(:stdout) { subject.page }}
14
+ let(:output) { capture_stdout { subject.page }}
15
15
 
16
16
  it 'creates a checkout_page.rb' do
17
17
  expect(output).to include('lib/sites/foo_site/pages/home_page.rb')
@@ -23,7 +23,7 @@ describe Taza::PageGenerator do
23
23
  end
24
24
 
25
25
  it 'gives message if site does not exist' do
26
- bar_page = capture(:stdout) { Taza::PageGenerator.new(['checkout', 'bar_site']).page }
26
+ bar_page = capture_stdout { Taza::PageGenerator.new(['checkout', 'bar_site']).page }
27
27
  expect(bar_page).to include("No such site bar_site exists")
28
28
  end
29
29
 
@@ -3,14 +3,14 @@ require 'spec_helper'
3
3
  describe Taza::PartialGenerator do
4
4
 
5
5
  before(:each) do
6
- capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site }
6
+ capture_stdout { Taza::SiteGenerator.new(['foo_site']).site }
7
7
  end
8
8
 
9
9
  context "taza partial navigation foo_site" do
10
10
  context "creates" do
11
11
 
12
12
  let(:subject) { Taza::PartialGenerator.new(['navigation', 'foo_site']) }
13
- let(:output) { capture(:stdout) { subject.partial } }
13
+ let(:output) { capture_stdout { subject.partial } }
14
14
 
15
15
  it 'a navigation.rb' do
16
16
  expect(output).to include('lib/sites/foo_site/pages/partials/navigation.rb')
@@ -18,7 +18,7 @@ describe Taza::PartialGenerator do
18
18
  end
19
19
 
20
20
  it 'message if site does not exist' do
21
- bar_page = capture(:stdout) { Taza::PartialGenerator.new(['navigation', 'bar_site']).partial }
21
+ bar_page = capture_stdout { Taza::PartialGenerator.new(['navigation', 'bar_site']).partial }
22
22
  expect(bar_page).to include("No such site bar_site exists")
23
23
  end
24
24
  end
@@ -5,7 +5,7 @@ describe Taza::ProjectGenerator do
5
5
  context "creates" do
6
6
 
7
7
  let(:subject) { Taza::ProjectGenerator.new(['foo_site']) }
8
- let(:output) { capture(:stdout) { subject.create } }
8
+ let(:output) { capture_stdout { subject.create } }
9
9
 
10
10
  it 'a Gemfile' do
11
11
  expect(output).to include("Gemfile")
@@ -5,7 +5,7 @@ describe Taza::SiteGenerator do
5
5
  context "creates" do
6
6
 
7
7
  let(:subject) { Taza::SiteGenerator.new(['foo_site']) }
8
- let(:output) { capture(:stdout) { subject.site } }
8
+ let(:output) { capture_stdout { subject.site } }
9
9
 
10
10
  it 'foo_site.rb' do
11
11
  expect(output).to include('lib/sites/foo_site.rb')
@@ -38,7 +38,7 @@ describe Taza::SiteGenerator do
38
38
  end
39
39
 
40
40
  it 'does not overwrite existing site' do
41
- capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site }
41
+ capture_stdout { Taza::SiteGenerator.new(['foo_site']).site }
42
42
  expect(output).to include(*["identical", "exist"])
43
43
  end
44
44
 
@@ -22,16 +22,15 @@ RSpec.configure do |config|
22
22
  FileUtils.rmtree(@directory)
23
23
  end
24
24
 
25
- def capture(stream)
25
+ def capture_stdout
26
26
  begin
27
- stream = stream.to_s
28
- eval "$#{stream} = StringIO.new"
27
+ $stdout = StringIO.new
29
28
  yield
30
- result = eval("$#{stream}").string
29
+ out = $stdout.string
31
30
  ensure
32
- eval("$#{stream} = #{stream.upcase}")
31
+ $stdout = STDOUT
33
32
  end
34
- result
33
+ out
35
34
  end
36
35
  end
37
36
 
@@ -29,7 +29,7 @@ describe Taza::Browser do
29
29
 
30
30
  it "should use params browser type when creating an watir webdriver instance" do
31
31
  Watir::Browser.expects(:new).with(:firefox)
32
- browser = Taza::Browser.create(:browser => :firefox, :driver => :watir_webdriver)
32
+ browser = Taza::Browser.create(:browser => :firefox, :driver => :watir)
33
33
  end
34
34
 
35
35
  it 'should use params browser type when creating a selenium webdriver instance' do
@@ -1,6 +1,5 @@
1
1
  require 'spec_helper'
2
2
  require 'taza/fixture'
3
- require 'extensions/array'
4
3
 
5
4
  describe Taza::Fixture do
6
5
  before :each do
@@ -30,7 +29,7 @@ describe Taza::Fixture do
30
29
  it "should be able to get all fixtures loaded excluding sub-folder fixtures" do
31
30
  fixture = Taza::Fixture.new
32
31
  fixture.load_fixtures_from(@base_path)
33
- expect(fixture.fixture_names).to be_equivalent [:examples,:users,:foos]
32
+ expect(fixture.fixture_names).to contain_exactly(:examples, :users, :foos)
34
33
  end
35
34
 
36
35
  it "should be able to get specific fixture entities" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taza
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Anderson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-24 00:00:00.000000000 Z
13
+ date: 2018-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -69,61 +69,33 @@ dependencies:
69
69
  - !ruby/object:Gem::Version
70
70
  version: 1.1.14
71
71
  - !ruby/object:Gem::Dependency
72
- name: firewatir
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: 1.9.4
78
- type: :runtime
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: 1.9.4
85
- - !ruby/object:Gem::Dependency
86
- name: watir-webdriver
72
+ name: watir
87
73
  requirement: !ruby/object:Gem::Requirement
88
74
  requirements:
89
75
  - - "~>"
90
76
  - !ruby/object:Gem::Version
91
- version: '0.4'
77
+ version: '6.0'
92
78
  type: :runtime
93
79
  prerelease: false
94
80
  version_requirements: !ruby/object:Gem::Requirement
95
81
  requirements:
96
82
  - - "~>"
97
83
  - !ruby/object:Gem::Version
98
- version: '0.4'
99
- - !ruby/object:Gem::Dependency
100
- name: watir
101
- requirement: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: 5.0.0
106
- type: :runtime
107
- prerelease: false
108
- version_requirements: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: 5.0.0
84
+ version: '6.0'
113
85
  - !ruby/object:Gem::Dependency
114
86
  name: activesupport
115
87
  requirement: !ruby/object:Gem::Requirement
116
88
  requirements:
117
89
  - - ">="
118
90
  - !ruby/object:Gem::Version
119
- version: 3.2.0
91
+ version: 4.0.2
120
92
  type: :runtime
121
93
  prerelease: false
122
94
  version_requirements: !ruby/object:Gem::Requirement
123
95
  requirements:
124
96
  - - ">="
125
97
  - !ruby/object:Gem::Version
126
- version: 3.2.0
98
+ version: 4.0.2
127
99
  - !ruby/object:Gem::Dependency
128
100
  name: thor
129
101
  requirement: !ruby/object:Gem::Requirement
@@ -160,26 +132,9 @@ executables:
160
132
  extensions: []
161
133
  extra_rdoc_files: []
162
134
  files:
163
- - ".gitignore"
164
- - ".rspec"
165
- - ".ruby-gemset"
166
- - ".travis.yml"
167
- - Gemfile
168
- - Gemfile.activesupport-3.2
169
- - Gemfile.activesupport-4.0
170
- - Gemfile.activesupport-4.1
171
- - Gemfile.activesupport-4.2
172
- - Gemfile.activesupport-5.0
173
135
  - History.txt
174
- - Manifest.txt
175
136
  - README.md
176
- - Rakefile
177
- - TODO
178
137
  - bin/taza
179
- - lib/extensions/array.rb
180
- - lib/extensions/hash.rb
181
- - lib/extensions/object.rb
182
- - lib/extensions/string.rb
183
138
  - lib/formatters/failing_examples_formatter.rb
184
139
  - lib/taza.rb
185
140
  - lib/taza/browser.rb
@@ -233,20 +188,16 @@ files:
233
188
  - spec/sandbox/pages/foo/baz.rb
234
189
  - spec/sandbox/pages/foo/partials/partial_the_reckoning.rb
235
190
  - spec/spec_helper.rb
236
- - spec/taza/array_spec.rb
237
191
  - spec/taza/browser_spec.rb
238
192
  - spec/taza/entity_spec.rb
239
193
  - spec/taza/fixture_spec.rb
240
194
  - spec/taza/fixtures_spec.rb
241
- - spec/taza/hash_spec.rb
242
195
  - spec/taza/page_module_spec.rb
243
196
  - spec/taza/page_spec.rb
244
197
  - spec/taza/settings_spec.rb
245
198
  - spec/taza/site_fixtures_spec.rb
246
199
  - spec/taza/site_spec.rb
247
- - spec/taza/string_spec.rb
248
200
  - spec/taza/taza_tasks_spec.rb
249
- - taza.gemspec
250
201
  homepage: http://github.com/hammernight/taza
251
202
  licenses: []
252
203
  metadata: {}
@@ -266,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
217
  version: '0'
267
218
  requirements: []
268
219
  rubyforge_project: taza
269
- rubygems_version: 2.4.5.1
220
+ rubygems_version: 2.6.14
270
221
  signing_key:
271
222
  specification_version: 4
272
223
  summary: Taza is an opinionated page object framework.
@@ -292,16 +243,13 @@ test_files:
292
243
  - spec/sandbox/pages/foo/baz.rb
293
244
  - spec/sandbox/pages/foo/partials/partial_the_reckoning.rb
294
245
  - spec/spec_helper.rb
295
- - spec/taza/array_spec.rb
296
246
  - spec/taza/browser_spec.rb
297
247
  - spec/taza/entity_spec.rb
298
248
  - spec/taza/fixture_spec.rb
299
249
  - spec/taza/fixtures_spec.rb
300
- - spec/taza/hash_spec.rb
301
250
  - spec/taza/page_module_spec.rb
302
251
  - spec/taza/page_spec.rb
303
252
  - spec/taza/settings_spec.rb
304
253
  - spec/taza/site_fixtures_spec.rb
305
254
  - spec/taza/site_spec.rb
306
- - spec/taza/string_spec.rb
307
255
  - spec/taza/taza_tasks_spec.rb
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
5
- .rvmrc
6
- .idea/
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1 +0,0 @@
1
- taza
@@ -1,39 +0,0 @@
1
- language: ruby
2
- before_install: gem update --remote bundler
3
- cache: bundler
4
- rvm:
5
- - 2.0
6
- - 2.1
7
- - 2.2
8
- - 2.3
9
- - ruby-head
10
- - jruby-9
11
- - rbx-2.2.7
12
- - rbx-3
13
- gemfile:
14
- - Gemfile.activesupport-3.2
15
- - Gemfile.activesupport-4.0
16
- - Gemfile.activesupport-4.1
17
- - Gemfile.activesupport-4.2
18
- - Gemfile.activesupport-5.0
19
- matrix:
20
- allow_failures:
21
- - rvm: ruby-head
22
- - rvm: rbx-2.2.7
23
- - rvm: rbx-3
24
- exclude:
25
- - rvm: 2.0
26
- gemfile: Gemfile.activesupport-5.0
27
- - rvm: 2.1
28
- gemfile: Gemfile.activesupport-5.0
29
- - rvm: 2.3
30
- gemfile: Gemfile.activesupport-3.2
31
- - rvm: ruby-head
32
- gemfile: Gemfile.activesupport-3.2
33
- - rvm: jruby-9
34
- gemfile: Gemfile.activesupport-5.0
35
- fast_finish: true
36
- notifications:
37
- email:
38
- - pnascimento@gmail.com
39
- - oriekenjr@gmail.com
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activesupport', '~> 3.2.0'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activesupport', '~> 4.0.0'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activesupport', '~> 4.1.0'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activesupport', '~> 4.2.0'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'activesupport', '~> 5.0.0'
@@ -1,61 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- bin/taza
6
- generators/flow/flow_generator.rb
7
- generators/flow/templates/flow.rb.erb
8
- generators/page/page_generator.rb
9
- generators/page/templates/functional_page_spec.rb.erb
10
- generators/page/templates/page.rb.erb
11
- generators/partial/partial_generator.rb
12
- generators/partial/templates/partial.rb.erb
13
- generators/site/site_generator.rb
14
- generators/site/templates/site.rb.erb
15
- generators/site/templates/site.yml.erb
16
- lib/app_generators/taza/taza_generator.rb
17
- lib/app_generators/taza/templates/config.yml.erb
18
- lib/app_generators/taza/templates/rakefile.rb.erb
19
- lib/app_generators/taza/templates/spec_helper.rb.erb
20
- lib/extensions/object.rb
21
- lib/extensions/string.rb
22
- lib/extensions/hash.rb
23
- lib/extensions/array.rb
24
- lib/taza.rb
25
- lib/taza/fixture.rb
26
- lib/taza/entity.rb
27
- lib/taza/browser.rb
28
- lib/taza/browsers/ie_watir.rb
29
- lib/taza/browsers/safari_watir.rb
30
- lib/taza/flow.rb
31
- lib/taza/page.rb
32
- lib/taza/settings.rb
33
- lib/taza/site.rb
34
- lib/taza/tasks.rb
35
- spec/browser_spec.rb
36
- spec/entity_spec.rb
37
- spec/flow_generator_spec.rb
38
- spec/fixture_spec.rb
39
- spec/fixtures_spec.rb
40
- spec/object_spec.rb
41
- spec/page_generator_spec.rb
42
- spec/page_spec.rb
43
- spec/partial_generator_spec.rb
44
- spec/platform/osx/browser_spec.rb
45
- spec/platform/windows/browser_spec.rb
46
- spec/project_generator_spec.rb
47
- spec/sandbox/config.yml
48
- spec/sandbox/config/config.yml
49
- spec/sandbox/config/site_name.yml
50
- spec/sandbox/flows/batman.rb
51
- spec/sandbox/flows/robin.rb
52
- spec/sandbox/pages/foo/bar.rb
53
- spec/sandbox/pages/foo/partials/partial_the_reckoning.rb
54
- spec/settings_spec.rb
55
- spec/site_generator_spec.rb
56
- spec/site_spec.rb
57
- spec/spec_helper.rb
58
- spec/taza_bin_spec.rb
59
- spec/taza_spec.rb
60
- spec/taza_tasks_spec.rb
61
- spec/unit_helper_spec.rb
data/Rakefile DELETED
@@ -1,5 +0,0 @@
1
- require 'bundler/setup'
2
- require 'rspec/core/rake_task'
3
- Bundler::GemHelper.install_tasks
4
- RSpec::Core::RakeTask.new(:spec)
5
- task :default => :spec
data/TODO DELETED
@@ -1,22 +0,0 @@
1
- Done:
2
- + Tagging test's (resolution: taglob)
3
- + sites and pages (resolution: Taza::Site)
4
- + generators for rakefile (resolution: uhh we made one?)
5
- + running tests by tag (resolution: ???)
6
- + gem server (resolution: taylor spiked this out)
7
- + build artifact of a video of a test running (resolution: we have two stories around this now)
8
- + test framework choices - what are we going to use and why we are using the one we are (resolution: rspec)
9
- + accessing the actual browser object (who creates it, who tears it down, etc)
10
- + block teardown of browser if yield is given for site
11
- + gem dependencies via hoe.(taglob,rake,rspec,mocha)
12
- + getting settings of a site: ex ECOM.settings delgates to taza::settings.site_file(ecom)
13
- + mocks
14
-
15
- taza
16
- - get rid of all the dumb ^M windows line endings
17
- - url resolving
18
- - ability to change yaml for a site
19
- - ability to run integration tests for just a site
20
- - clean all the config tests
21
- - add test/spec support for generators
22
- - add test/spec support for fixtures
@@ -1,10 +0,0 @@
1
- class Array
2
- # Returns true if the two arrays elements are equal ignoring order
3
- # Example:
4
- # [1,2].equivalent([2,1]) # => true
5
- # [1,2,3].equivalent([2,1]) # => false
6
- def equivalent?(other_array)
7
- merged_array = self & other_array
8
- merged_array.size == self.size && merged_array.size == other_array.size
9
- end
10
- end
@@ -1,15 +0,0 @@
1
- class Hash
2
- def convert_hash_keys_to_methods(fixture) # :nodoc:
3
- Taza::Entity.new(self,fixture)
4
- end
5
-
6
- # Recursively replace key names that should be symbols with symbols.
7
- def key_strings_to_symbols!
8
- result = Hash.new
9
- self.each_pair do |key,value|
10
- value.key_strings_to_symbols! if value.kind_of? Hash and value.respond_to? :key_strings_to_symbols!
11
- result[key.to_sym] = value
12
- end
13
- self.replace(result)
14
- end
15
- end
@@ -1,6 +0,0 @@
1
- # instance_exec comes with >1.8.7 thankfully
2
- class Object
3
- def metaclass
4
- class << self; self; end
5
- end
6
- end
@@ -1,22 +0,0 @@
1
-
2
- class String
3
- # pluralizes a string and turns it into a symbol
4
- # Example:
5
- # "apple".pluralize_to_sym # => :apples
6
- def pluralize_to_sym
7
- self.pluralize.to_sym
8
- end
9
-
10
- # takes human readable words and
11
- # turns it into ruby variable format
12
- # dash and spaces to underscore
13
- # and lowercases
14
- def variablize
15
- self.squeeze!(' ')
16
- self.gsub!(/\s+/,'_')
17
- self.gsub!('-', '_')
18
- self.squeeze!('_')
19
- self.downcase!
20
- self
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- require 'spec_helper'
2
- require 'extensions/array'
3
-
4
- describe 'Array Extensions' do
5
- it "should know if elements are not equivalent to a subset of those elements" do
6
- expect([1,2,3]).to_not be_equivalent [2,3]
7
- end
8
- it "should know if elements are not equivalent to a larger set including those elements" do
9
- expect([1,2,3]).to_not be_equivalent [1,2,3,4]
10
- end
11
- it "should know it is equivalent if the same order" do
12
- expect([1,2,3]).to be_equivalent [1,2,3]
13
- end
14
- it "should know it is equivalent if the different orders" do
15
- expect([1,2,3]).to be_equivalent [2,1,3]
16
- end
17
- end
@@ -1,15 +0,0 @@
1
- require 'spec_helper'
2
- require 'taza/entity'
3
- require 'extensions/hash'
4
-
5
- # This is too tightly coupled to Taza::Entity
6
- describe 'Hash Extensions' do
7
- it "should add methods for hash keys to some instance" do
8
- entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
9
- expect(entity).to respond_to :apple
10
- end
11
- it "should not add the methods to a hash" do
12
- entity = {'apple' => 'pie'}.convert_hash_keys_to_methods(nil)
13
- expect(entity).to_not be_a_instance_of Hash
14
- end
15
- end
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
- require 'extensions/string'
3
-
4
- describe "string extensions" do
5
- it "should pluralize and to sym a string" do
6
- expect("apple".pluralize_to_sym).to eql :apples
7
- end
8
-
9
- it "should variablize words with spaces" do
10
- expect("foo - BAR".variablize).to eql 'foo_bar'
11
- end
12
- end
@@ -1,31 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "taza/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "taza"
7
- s.version = Taza::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Adam Anderson", "Pedro Nascimento", "Oscar Rieken"]
10
- s.email = ["watir-general@googlegroups.com"]
11
- s.homepage = "http://github.com/hammernight/taza"
12
- s.summary = "Taza is an opinionated page object framework."
13
- s.description = "Taza is an opinionated page object framework."
14
- s.required_ruby_version = '>= 2.0.0'
15
- s.rubyforge_project = "taza"
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
-
21
- s.add_runtime_dependency(%q<rake>, [">= 0.9.2"])
22
- s.add_runtime_dependency(%q<mocha>, [">= 0.9.3"])
23
- s.add_runtime_dependency(%q<user-choices>, ["~> 1.1.6.1"])
24
- s.add_runtime_dependency(%q<Selenium>, ["~> 1.1.14"])
25
- s.add_runtime_dependency(%q<firewatir>, ["~> 1.9.4"])
26
- s.add_runtime_dependency(%q<watir-webdriver>, ["~> 0.4"])
27
- s.add_runtime_dependency(%q<watir>, [">= 5.0.0"])
28
- s.add_runtime_dependency(%q<activesupport>, [">= 3.2.0"])
29
- s.add_runtime_dependency(%q<thor>, [">= 0.18.1"])
30
- s.add_runtime_dependency(%q<rspec>, ["~> 3.0"])
31
- end