chemistrykit 3.9.1 → 3.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ 1.9.3-p448
@@ -9,3 +9,9 @@ SymbolName:
9
9
 
10
10
  Documentation:
11
11
  Enabled: false
12
+
13
+ AllCops:
14
+ Includes:
15
+ - Gemfile
16
+ Excludes:
17
+ - report/config.rb
@@ -1,3 +1,19 @@
1
+ #3.10.0 (2013-09-17)
2
+ Merged various pull requests including subfolders in beaker directory
3
+
4
+ - Bumped version to 3.10.0 to prepare for release.
5
+ - fixed small typo with tests
6
+ - updated docs to detail catalyst usage
7
+ - updated template not to include depracated log configuration to close #73
8
+ - fixed typo with test, updated variable to be more verbose, changed all the ckit executions in the cucumber tests to use bundle exec
9
+ - updated rvm rbenv managment to new mode
10
+ - locked ruby version until clearing up how that can be managed
11
+ - updated rubo and fixed some code quality issues
12
+ - added contribution clarity to readme docs
13
+ - add a test to run beakers from a sub-directory
14
+ - bump selenium-webdriver to overcome a loading error for rubyzip
15
+ - Beaker directory now supports sub-directories
16
+
1
17
  #3.9.1 (2013-08-26)
2
18
  small fix to gemfile
3
19
 
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # Encoding: utf-8
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify dependencies in chemistrykit.gemspec
4
6
  gemspec
@@ -6,16 +8,15 @@ gemspec
6
8
  gem 'aruba', '~> 0.5.1'
7
9
  gem 'cucumber', '~> 1.2.1'
8
10
  gem 'rake', '~> 10.0.3'
9
- gem 'rubocop'
11
+ gem 'rubocop', git: 'git://github.com/bbatsov/rubocop.git', branch: 'master'
10
12
  gem 'coveralls', '~> 0.6.7'
11
13
  gem 'flog'
12
14
  gem 'flay'
13
15
  gem 'ruby2ruby'
14
16
  gem 'reek', '1.3.1'
15
17
  gem 'guard-reek'
18
+ gem 'guard-rspec'
16
19
  gem 'guard-rubocop'
17
- gem "selenium-client", "~> 1.2.18"
20
+ gem 'selenium-client', '~> 1.2.18'
18
21
  gem 'compass'
19
22
  gem 'zurb-foundation'
20
-
21
-
data/Guardfile CHANGED
@@ -1,5 +1,3 @@
1
- # Encoding: utf-8
2
-
3
1
  guard :rspec do
4
2
  watch(%r{^spec/unit/.+_spec\.rb$})
5
3
  watch(%r{^spec/integration/.+_spec\.rb$})
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- #ChemistryKit 3.9.1 (2013-08-26)
1
+ #ChemistryKit 3.10.0 (2013-09-17)
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/chemistrykit.png)](http://badge.fury.io/rb/chemistrykit) [![Build Status](https://travis-ci.org/arrgyle/chemistrykit.png?branch=develop)](https://travis-ci.org/jrobertfox/chef-broiler-platter) [![Code Climate](https://codeclimate.com/github/arrgyle/chemistrykit.png)](https://codeclimate.com/github/arrgyle/chemistrykit) [![Coverage Status](https://coveralls.io/repos/arrgyle/chemistrykit/badge.png?branch=develop)](https://coveralls.io/r/arrgyle/chemistrykit?branch=develop)
4
4
 
@@ -74,11 +74,11 @@ To exclude a tag, put a ~ in front of it.
74
74
  During development it is often helpful to just run a specific beaker, this can be accomplished with the `--beakers` flag:
75
75
 
76
76
  ckit brew --beakers=beakers/wip_beaker.rb
77
-
77
+
78
78
  ####Special Tags
79
79
  There are some tags that can be used to control various aspects of the harness. The following are supported:
80
80
 
81
- - `public: SOME_VALUE` - If you are running your harness against sauce labs, then you can control how the permissions are set for a particular beaker according to the visibility options detailed at the bottom of [this page](https://saucelabs.com/docs/additional-config). For example if you wanted a test to be private you could add `public: 'private'` to your beaker tags.
81
+ - `public: SOME_VALUE` - If you are running your harness against sauce labs, then you can control how the permissions are set for a particular beaker according to the visibility options detailed at the bottom of [this page](https://saucelabs.com/docs/additional-config). For example if you wanted a test to be private you could add `public: 'private'` to your beaker tags.
82
82
 
83
83
  ###Formula Loading
84
84
  Code in the `formula` directory can be used to build out page objects and helper functions to facilitate your testing. The files are loaded in a particular way:
@@ -149,9 +149,29 @@ Would get you (assuming `sub_account1` has a type of `sub_account`, and a field
149
149
 
150
150
  Inside your formula. COOL!
151
151
 
152
-
153
152
  The FormulaLab will handle the heavy lifting of assembling your formula with a driver and correct chemist (if the formula needs one). Also note that the specific instance of chemist is cached so that any changes your formula makes to the chemist is reflected in other formulas that use it.
154
153
 
154
+ ###Catalysts! Driving Tests with Data
155
+ In addition to using **Chemists** to mix data into your test barness, you can also use **Catalysts** simple key-value stores that can be populated from a CSV file. Formulas can set and get a catalyst or use the `catalyize` method to directly inject the data into the formula by file name. Once you have a catalyst, simply access the values by their keys:
156
+
157
+ ```Ruby
158
+ # my_beaker.rb
159
+ describe "my beaker", :depth => 'shallow' do
160
+ let(:my_formula) { @formula_lab.mix('my_other_formula') }
161
+
162
+ my_formula.catalyst = ChemistryKit::Catalyst.new('/path/to/data.csv')
163
+ # or
164
+ my_formula.catalyze('/path/to/data.csv')
165
+ end
166
+
167
+ # my_formula.rb
168
+ module Formulas
169
+ class MyFormula < Formula
170
+ some_value = catalyst.my_key
171
+ end
172
+ end
173
+ ```
174
+
155
175
  ###Execution Order
156
176
  Chemistry Kit executes specs in a random order. This is intentional. Knowing the order a spec will be executed in allows for dependencies between them to creep in. Sometimes unintentionally. By having them go in a random order parallelization becomes a much easier.
157
177
 
@@ -256,6 +276,8 @@ This project conforms to the [neverstopbuilding/craftsmanship](https://github.co
256
276
  - Documentation expectations
257
277
  - Release process
258
278
 
279
+ Most importantly, submit your pull requests to the `develop` branch.
280
+
259
281
  ###Check out the user group!
260
282
  [https://groups.google.com/forum/#!forum/chemistrykit-users](https://groups.google.com/forum/#!forum/chemistrykit-users)
261
283
 
data/Rakefile CHANGED
@@ -68,12 +68,12 @@ end
68
68
 
69
69
  # TODO: fix all the smells and turn on failing on error
70
70
  Reek::Rake::Task.new do |t|
71
- t.fail_on_error = false
72
- t.verbose = false
73
- t.reek_opts = '--quiet'
71
+ t.fail_on_error = false
72
+ t.verbose = false
73
+ t.reek_opts = '--quiet'
74
74
  end
75
75
 
76
- # TODO This could probably be more cleanly automated
76
+ # TODO: This could probably be more cleanly automated
77
77
  desc 'Start a release (Requires Git Flow)'
78
78
  task :release_start, [:version, :no_verify] do |t, args|
79
79
  version = args['version']
@@ -110,7 +110,7 @@ task :release_start, [:version, :no_verify] do |t, args|
110
110
  puts "You've started release #{version}, make any last minute updates now.\n"
111
111
  end
112
112
 
113
- # TODO This could probablly be more cleanly automated
113
+ # TODO: This could probably be more cleanly automated
114
114
  desc 'Finish a release (Requires Git Flow and Gem Deploy Permissions'
115
115
  task :release_finish, :update_message do |t, args|
116
116
  message = args['update_message']
@@ -166,7 +166,7 @@ task :release_finish, :update_message do |t, args|
166
166
  system "rm chemistrykit-#{version}.gem"
167
167
 
168
168
  # finish the release
169
- # TODO there is a bug with git flow, and you still need to deal with merge
169
+ # TODO: there is a bug with git flow, and you still need to deal with merge
170
170
  # messages, might just do this with git directly
171
171
  system "git flow release finish -m'#{version}' #{version}"
172
172
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'chemistrykit'
5
- s.version = '3.9.1'
5
+ s.version = '3.10.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ['Dave Haeffner', 'Jason Fox']
8
8
  s.email = ['dave@arrgyle.com', 'jason@arrgyle.com']
9
9
  s.homepage = 'https://github.com/arrgyle/chemistrykit'
10
10
  s.summary = 'A simple and opinionated web testing framework for Selenium that follows convention over configuration.'
11
- s.description = 'small fix to gemfile'
11
+ s.description = 'Merged various pull requests including subfolders in beaker directory'
12
12
  s.license = 'MIT'
13
13
 
14
14
  s.files = `git ls-files`.split($/)
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency 'thor', '~> 0.17.0'
23
23
  s.add_dependency 'rspec', '~> 2.14.1'
24
24
  s.add_dependency 'builder', '~> 3.2.2'
25
- s.add_dependency 'selenium-webdriver', '~> 2.29.0'
25
+ s.add_dependency 'selenium-webdriver', '~> 2.35.1'
26
26
  s.add_dependency 'rest-client', '~> 1.6.7'
27
27
  s.add_dependency 'selenium-connect', '~> 3.7.0'
28
28
  s.add_dependency 'parallel_tests', '~> 0.15.0'
@@ -6,7 +6,7 @@ This way tests will be able to execute without being prompted by a modal dialog
6
6
 
7
7
 
8
8
  Background:
9
- Given I run `ckit new basic_auth_harness`
9
+ Given I run `bundle exec ckit new basic_auth_harness`
10
10
  And I cd to "basic_auth_harness"
11
11
  And a file named "beakers/basic_auth_1_beaker.rb" with:
12
12
  """
@@ -25,7 +25,7 @@ Scenario: Pre-load HTTP before each test
25
25
  password: 'admin'
26
26
  http_path: '/'
27
27
  """
28
- When I run `ckit brew`
28
+ When I run `bundle exec ckit brew`
29
29
  Then the stdout should contain "1 example, 0 failures"
30
30
 
31
31
  Scenario: Pre-load HTTP before each test without the http_path set
@@ -36,7 +36,7 @@ Scenario: Pre-load HTTP before each test without the http_path set
36
36
  username: 'admin'
37
37
  password: 'admin'
38
38
  """
39
- When I run `ckit brew`
39
+ When I run `bundle exec ckit brew`
40
40
  Then the stdout should contain "1 example, 0 failures"
41
41
 
42
42
  Scenario: Works without Basic Auth
@@ -44,5 +44,5 @@ Scenario: Works without Basic Auth
44
44
  """
45
45
  base_url: 'http://google.com'
46
46
  """
47
- When I run `ckit brew`
47
+ When I run `bundle exec ckit brew`
48
48
  Then the stdout should contain "1 example, 0 failures"
@@ -8,7 +8,7 @@ Feature: Brewing a ChemistryKit project
8
8
  2. With Sauce Ondemand
9
9
 
10
10
  Background: Setup the project
11
- Given I run `ckit new booker`
11
+ Given I run `bundle exec ckit new booker`
12
12
  And I cd to "booker"
13
13
  And a file named "formulas/bookie.rb" with:
14
14
  """
@@ -37,7 +37,7 @@ Feature: Brewing a ChemistryKit project
37
37
  selenium_connect:
38
38
  host: 'localhost'
39
39
  """
40
- When I run `ckit brew`
40
+ When I run `bundle exec ckit brew`
41
41
  Then the stdout should contain "1 example, 0 failures"
42
42
  And the following files should exist:
43
43
  | evidence/junit_0.xml |
@@ -59,9 +59,29 @@ Feature: Brewing a ChemistryKit project
59
59
  end
60
60
  end
61
61
  """
62
- When I run `ckit brew --beakers=beakers/other_beaker.rb`
62
+ When I run `bundle exec ckit brew --beakers=beakers/other_beaker.rb`
63
63
  Then the stdout should contain "1 example, 0 failures"
64
64
 
65
+ Scenario: Brew beakers where the beakers directory contains a sub-directory
66
+ Given a file named "config.yaml" with:
67
+ """
68
+ selenium_connect:
69
+ log: 'evidence'
70
+ host: 'localhost'
71
+ """
72
+ And a file named "beakers/sub/other_beaker.rb" with:
73
+ """
74
+ describe "SubDirectory" do
75
+ let(:book) { Formulas::Bookie.new(@driver) }
76
+
77
+ it "loads an external web page" do
78
+ book.open "http://www.google.com"
79
+ end
80
+ end
81
+ """
82
+ When I run `bundle exec ckit brew --all`
83
+ Then the stdout should contain "2 examples, 0 failures"
84
+
65
85
  Scenario: Run all the tests regardless of tag
66
86
  Given a file named "config.yaml" with:
67
87
  """
@@ -78,7 +98,7 @@ Feature: Brewing a ChemistryKit project
78
98
  end
79
99
  end
80
100
  """
81
- When I run `ckit brew --all`
101
+ When I run `bundle exec ckit brew --all`
82
102
  Then the stdout should contain "2 examples, 0 failures"
83
103
 
84
104
  Scenario: Saucelabs
@@ -103,7 +123,7 @@ Feature: Brewing a ChemistryKit project
103
123
  end
104
124
  end
105
125
  """
106
- When I run `ckit brew --beakers=beakers/failure.rb`
126
+ When I run `bundle exec ckit brew --beakers=beakers/failure.rb`
107
127
  Then the stdout should contain "1 example, 1 failure"
108
128
  And there should be "1" "failed image" log files in "evidence/failing_beaker/failing_beaker_loads_an_external_web_page"
109
129
  And there should be "1" "report" log files in "evidence/failing_beaker/failing_beaker_loads_an_external_web_page"
@@ -127,7 +147,7 @@ Feature: Brewing a ChemistryKit project
127
147
  end
128
148
  end
129
149
  """
130
- When I run `ckit brew --beakers=beakers/other_beaker.rb`
150
+ When I run `bundle exec ckit brew --beakers=beakers/other_beaker.rb`
131
151
  Then the stdout should contain "RSpec::Retry: 2nd try"
132
152
  Then the stdout should contain "RSpec::Retry: 3rd try"
133
153
 
@@ -150,7 +170,7 @@ Feature: Brewing a ChemistryKit project
150
170
  end
151
171
  end
152
172
  """
153
- When I run `ckit brew --beakers=beakers/other_beaker.rb --retry=3`
173
+ When I run `bundle exec ckit brew --beakers=beakers/other_beaker.rb --retry=3`
154
174
  Then the stdout should contain "RSpec::Retry: 2nd try"
155
175
  Then the stdout should contain "RSpec::Retry: 3rd try"
156
176
 
@@ -2,7 +2,7 @@ Feature: Catalyst
2
2
  Catalyst: n. A pocket of data (consumed from a CSV file) used to drive a test that needs it.
3
3
 
4
4
  Scenario: Use a catalyst value to drive a test
5
- Given I run `ckit new catalyst-example`
5
+ Given I run `bundle exec ckit new catalyst-example`
6
6
  And I cd to "catalyst-example"
7
7
 
8
8
  And a file named "formulas/lib/catalysts/google_test_data.csv" with:
@@ -83,5 +83,5 @@ Catalyst: n. A pocket of data (consumed from a CSV file) used to drive a test th
83
83
  selenium_connect:
84
84
  host: 'localhost'
85
85
  """
86
- When I run `ckit brew`
86
+ When I run `bundle exec ckit brew`
87
87
  Then the stdout should contain "1 example, 0 failures"
@@ -1,7 +1,7 @@
1
1
  Feature: Brewing a ChemistryKit project
2
2
 
3
3
  Background: Setup the project
4
- Given I run `ckit new chemists-test`
4
+ Given I run `bundle exec ckit new chemists-test`
5
5
  And I cd to "chemists-test"
6
6
  And a file named "chemists/chemists.csv" with:
7
7
  """
@@ -112,7 +112,7 @@ Feature: Brewing a ChemistryKit project
112
112
  end
113
113
  end
114
114
  """
115
- When I run `ckit brew`
115
+ When I run `bundle exec ckit brew`
116
116
  Then the stdout should contain "1 example, 0 failures"
117
117
 
118
118
  Scenario: Chemist formula loading with formula_lab
@@ -128,7 +128,7 @@ Feature: Brewing a ChemistryKit project
128
128
  end
129
129
  end
130
130
  """
131
- When I run `ckit brew`
131
+ When I run `bundle exec ckit brew`
132
132
  Then the stdout should contain "1 example, 0 failures"
133
133
 
134
134
  Scenario: Loading multiple formulas in a beaker
@@ -157,7 +157,7 @@ Feature: Brewing a ChemistryKit project
157
157
  Key,Type,Email,Name,Password
158
158
  other1,other,other@email.com,Mr. Other,abc123$
159
159
  """
160
- When I run `ckit brew`
160
+ When I run `bundle exec ckit brew`
161
161
  Then the stdout should contain "2 examples, 0 failures"
162
162
 
163
163
  @announce
@@ -179,5 +179,5 @@ Feature: Brewing a ChemistryKit project
179
179
  Key,Type,Item
180
180
  other1,some_sub_account,some
181
181
  """
182
- When I run `ckit brew`
182
+ When I run `bundle exec ckit brew`
183
183
  Then the stdout should contain "1 example, 0 failures"
@@ -4,7 +4,7 @@ Feature: Support for concurency
4
4
  I want to run them in parallel
5
5
 
6
6
  Background:
7
- Given I run `ckit new concurrency-test`
7
+ Given I run `bundle exec ckit new concurrency-test`
8
8
  And I cd to "concurrency-test"
9
9
  And a file named "beakers/first_beaker.rb" with:
10
10
  """
@@ -40,14 +40,14 @@ Feature: Support for concurency
40
40
  """
41
41
 
42
42
  Scenario: I can run the tests in parallel
43
- When I run `ckit brew`
43
+ When I run `bundle exec ckit brew`
44
44
  Then the stdout should contain "4 processes for 2 beakers"
45
45
  And the stdout should contain "3 examples, 0 failures"
46
46
  And the file "evidence/results_junit.xml" should not exist
47
47
  And there should be "2" unique results files in the "evidence" directory
48
48
 
49
49
  Scenario: I can run a specific beaker in parallel
50
- When I run `ckit brew --beakers=beakers/first_beaker.rb`
50
+ When I run `bundle exec ckit brew --beakers=beakers/first_beaker.rb`
51
51
  Then the stdout should contain "4 processes for 1 beakers"
52
52
  And the stdout should contain "2 examples, 0 failures"
53
53
 
@@ -70,7 +70,7 @@ Feature: Support for concurency
70
70
  end
71
71
  end
72
72
  """
73
- When I run `ckit brew --tag item:test`
73
+ When I run `bundle exec ckit brew --tag item:test`
74
74
  And the stdout should contain "2 examples, 0 failures"
75
75
 
76
76
  Scenario: I can all beakers in parallel
@@ -92,7 +92,7 @@ Feature: Support for concurency
92
92
  end
93
93
  end
94
94
  """
95
- When I run `ckit brew --all`
95
+ When I run `bundle exec ckit brew --all`
96
96
  Then the stdout should not contain "All examples were filtered out"
97
97
  And the stdout should not contain "0 examples, 0 failures"
98
98
  And there should be "4" unique results files in the "evidence" directory
@@ -1,7 +1,7 @@
1
1
  Feature: Exit Status
2
2
 
3
3
  Background:
4
- Given I run `ckit new cheese`
4
+ Given I run `bundle exec ckit new cheese`
5
5
  And I cd to "cheese"
6
6
  And a file named "config.yaml" with:
7
7
  """
@@ -19,7 +19,7 @@ Feature: Exit Status
19
19
  end
20
20
  end
21
21
  """
22
- When I run `ckit brew`
22
+ When I run `bundle exec ckit brew`
23
23
  Then the exit code should be 0
24
24
 
25
25
  Scenario: Failing
@@ -32,5 +32,5 @@ Feature: Exit Status
32
32
  end
33
33
  end
34
34
  """
35
- When I run `ckit brew`
35
+ When I run `bundle exec ckit brew`
36
36
  Then the exit code should be 1
@@ -4,7 +4,7 @@ Feature: Initialize a global configuration
4
4
  I want to specify configurations in a central file so they are available in test scripts
5
5
 
6
6
  Scenario: Use a configuration option in a beaker
7
- Given I run `ckit new global-config-test`
7
+ Given I run `bundle exec ckit new global-config-test`
8
8
  And I cd to "global-config-test"
9
9
  And a file named "beakers/test_beaker.rb" with:
10
10
  """
@@ -21,5 +21,5 @@ Feature: Initialize a global configuration
21
21
  selenium_connect:
22
22
  host: 'localhost'
23
23
  """
24
- When I run `ckit brew`
24
+ When I run `bundle exec ckit brew`
25
25
  Then the stdout should contain "1 example, 0 failures"
@@ -2,7 +2,7 @@ Feature: Load Page Objects
2
2
  Formulas should be loaded in the correct order with thier dependencies
3
3
 
4
4
  Scenario: Load the libs first
5
- Given I run `ckit new big-project`
5
+ Given I run `bundle exec ckit new big-project`
6
6
  And I cd to "big-project"
7
7
  And a file named "config.yaml" with:
8
8
  """
@@ -44,5 +44,5 @@ Formulas should be loaded in the correct order with thier dependencies
44
44
  end
45
45
  """
46
46
 
47
- When I run `ckit brew`
47
+ When I run `bundle exec ckit brew`
48
48
  Then the stdout should contain "1 example, 0 failures"
@@ -5,7 +5,7 @@ Feature: Support for multiple configuration files
5
5
  I want to specify different configuration files on the command line
6
6
 
7
7
  Background:
8
- Given I run `ckit new config-test`
8
+ Given I run `bundle exec ckit new config-test`
9
9
  And I cd to "config-test"
10
10
  And a file named "beakers/test_beaker.rb" with:
11
11
  """
@@ -24,7 +24,7 @@ Feature: Support for multiple configuration files
24
24
  log: 'evidence_config'
25
25
  host: 'localhost'
26
26
  """
27
- When I run `ckit brew`
27
+ When I run `bundle exec ckit brew`
28
28
  Then the stdout should contain "1 example, 0 failures"
29
29
  And the following files should exist:
30
30
  | evidence_config/cheese/cheese_loads_an_external_web_page/server.log |
@@ -37,7 +37,7 @@ Feature: Support for multiple configuration files
37
37
  log: 'evidence_alternate'
38
38
  host: 'localhost'
39
39
  """
40
- When I run `ckit brew --config alternate.yaml`
40
+ When I run `bundle exec ckit brew --config alternate.yaml`
41
41
  Then the stdout should contain "1 example, 0 failures"
42
42
  And the following files should exist:
43
43
  | evidence_alternate/cheese/cheese_loads_an_external_web_page/server.log |
@@ -50,7 +50,7 @@ Feature: Support for multiple configuration files
50
50
  log: 'evidence_alternate'
51
51
  host: 'localhost'
52
52
  """
53
- When I run `ckit brew -c alternate.yaml`
53
+ When I run `bundle exec ckit brew -c alternate.yaml`
54
54
  Then the stdout should contain "1 example, 0 failures"
55
55
  And the following files should exist:
56
56
  | evidence_alternate/cheese/cheese_loads_an_external_web_page/server.log |
@@ -63,7 +63,7 @@ Feature: Support for multiple configuration files
63
63
  log: 'evidence_alternate'
64
64
  host: 'localhost'
65
65
  """
66
- When I run `ckit brew --config alternate.yaml`
66
+ When I run `bundle exec ckit brew --config alternate.yaml`
67
67
  Then the stdout should contain "1 example, 0 failures"
68
68
  And the following files should exist:
69
69
  | evidence_alternate/cheese/cheese_loads_an_external_web_page/server.log |
@@ -5,7 +5,7 @@ Feature: Advanced HTML Reports
5
5
  I want a detailed HTML report of failures
6
6
 
7
7
  Background:
8
- Given I run `ckit new reporting-test`
8
+ Given I run `bundle exec ckit new reporting-test`
9
9
  And I cd to "reporting-test"
10
10
  And a file named "beakers/first_beaker.rb" with:
11
11
  """
@@ -49,7 +49,7 @@ Feature: Advanced HTML Reports
49
49
  """
50
50
 
51
51
  Scenario: I can run the tests
52
- When I run `ckit brew`
52
+ When I run `bundle exec ckit brew`
53
53
  Then the stdout should contain "5 examples, 3 failures, 1 pending"
54
54
  And the following files should exist:
55
55
  | evidence/final_results.html |
@@ -62,7 +62,7 @@ Feature: Advanced HTML Reports
62
62
  selenium_connect:
63
63
  browser: 'chrome'
64
64
  """
65
- When I run `ckit brew`
65
+ When I run `bundle exec ckit brew`
66
66
  Then the stdout should contain "5 examples, 3 failures, 1 pending"
67
67
  And the following files should exist:
68
68
  | evidence/final_results.html |
@@ -79,7 +79,7 @@ Feature: Advanced HTML Reports
79
79
  sauce_api_key: 'ab7a6e17-16df-42d2-9ef6-c8d2539cc38a'
80
80
  description: 'concurrency check'
81
81
  """
82
- When I run `ckit brew`
82
+ When I run `bundle exec ckit brew`
83
83
  Then the stdout should contain "2 processes for 3 beakers"
84
84
  And the following files should exist:
85
85
  | evidence/final_results.html |
@@ -94,7 +94,7 @@ Feature: Advanced HTML Reports
94
94
  end
95
95
  end
96
96
  """
97
- When I run `ckit brew --beakers=beakers/fourth_beaker.rb`
97
+ When I run `bundle exec ckit brew --beakers=beakers/fourth_beaker.rb`
98
98
  And the following files should exist:
99
99
  | evidence/final_results.html |
100
100
 
@@ -109,7 +109,7 @@ Given a file named "beakers/fifth_beaker.rb" with:
109
109
  end
110
110
  end
111
111
  """
112
- When I run `ckit brew --beakers=beakers/fifth_beaker.rb`
112
+ When I run `bundle exec ckit brew --beakers=beakers/fifth_beaker.rb`
113
113
  And the following files should exist:
114
114
  | evidence/final_results.html |
115
115
 
@@ -2,7 +2,7 @@
2
2
  Feature: Sauce specific feature tests
3
3
 
4
4
  Background:
5
- Given I run `ckit new sauce-test`
5
+ Given I run `bundle exec ckit new sauce-test`
6
6
  And I cd to "sauce-test"
7
7
  And a file named "beakers/first_beaker.rb" with:
8
8
  """
@@ -26,7 +26,7 @@ Feature: Sauce specific feature tests
26
26
  """
27
27
 
28
28
  Scenario: Default permission config should work
29
- When I run `ckit brew`
29
+ When I run `bundle exec ckit brew`
30
30
  Then the stdout should contain "1 example, 0 failures"
31
31
  And the file "evidence/sauce_beaker/sauce_beaker_test/sauce_job.log" should contain "private"
32
32
 
@@ -40,7 +40,7 @@ Feature: Sauce specific feature tests
40
40
  end
41
41
  end
42
42
  """
43
- When I run `ckit brew`
43
+ When I run `bundle exec ckit brew`
44
44
  Then the stdout should contain "1 example, 0 failures"
45
45
  And the file "evidence/sauce_beaker/sauce_beaker_test/sauce_job.log" should contain "share"
46
46
  And the file "evidence/sauce_beaker/sauce_beaker_test/sauce_job.log" should contain "crazy:test_tag"
@@ -1,7 +1,7 @@
1
1
  Feature: opting out of ab tests based on configuration
2
2
 
3
3
  Background:
4
- Given I run `ckit new split-test`
4
+ Given I run `bundle exec ckit new split-test`
5
5
  And I cd to "split-test"
6
6
  And a file named "beakers/first_beaker.rb" with:
7
7
  """
@@ -24,5 +24,5 @@ Background:
24
24
  """
25
25
 
26
26
  Scenario: opt out is on
27
- When I run `ckit brew`
27
+ When I run `bundle exec ckit brew`
28
28
  Then the stdout should contain "1 example, 0 failures"
@@ -4,6 +4,6 @@ require 'aruba/cucumber'
4
4
 
5
5
  Before do
6
6
  FileUtils.rm_rf('build/tmp')
7
- @aruba_timeout_seconds = 150
7
+ @aruba_timeout_seconds = (3 * 60)
8
8
  @dirs = ['build/tmp']
9
9
  end
@@ -1,10 +1,11 @@
1
+ @announce
1
2
  Feature: Listing all the tags
2
3
  In order to see all the tags I'm using
3
4
  As a harness developer
4
5
  I want to run a command to list all the tags
5
6
 
6
7
  Background: Setup the project
7
- Given I run `ckit new tags-test`
8
+ Given I run `bundle exec ckit new tags-test`
8
9
  And I cd to "tags-test"
9
10
 
10
11
  Scenario: Get the tag for a single beaker
@@ -18,7 +19,7 @@ Feature: Listing all the tags
18
19
  end
19
20
  end
20
21
  """
21
- When I run `ckit tags`
22
+ When I run `bundle exec ckit tags`
22
23
  Then the stdout should contain "depth:shallow"
23
24
 
24
25
  Scenario: Get the tags inside a beaker
@@ -35,7 +36,7 @@ Feature: Listing all the tags
35
36
  end
36
37
  end
37
38
  """
38
- When I run `ckit tags`
39
+ When I run `bundle exec ckit tags`
39
40
  Then the stdout should contain "depth:shallow"
40
41
  And the stdout should contain "depth:deep"
41
42
 
@@ -66,8 +67,8 @@ Feature: Listing all the tags
66
67
  end
67
68
  end
68
69
  """
69
- When I run `ckit tags`
70
- Then the stdout from "ckit tags" should contain:
70
+ When I run `bundle exec ckit tags`
71
+ Then the stdout from "bundle exec ckit tags" should contain:
71
72
  """
72
73
  ....
73
74
  Tags used in harness:
@@ -45,7 +45,7 @@ module ChemistryKit
45
45
 
46
46
  desc 'tags', 'Lists all tags in use in the test harness.'
47
47
  def tags
48
- beakers = Dir.glob(File.join(Dir.getwd, 'beakers/*'))
48
+ beakers = Dir.glob(File.join(Dir.getwd, 'beakers/**/*')).select { |file| !File.directory?(file) }
49
49
  ::RSpec.configure do |c|
50
50
  c.add_setting :used_tags
51
51
  c.before(:suite) { ::RSpec.configuration.used_tags = [] }
@@ -88,7 +88,7 @@ module ChemistryKit
88
88
  load_page_objects
89
89
 
90
90
  # get those beakers that should be executed
91
- beakers = options['beakers'] ? options['beakers'] : Dir.glob(File.join(Dir.getwd, 'beakers/*'))
91
+ beakers = options['beakers'] ? options['beakers'] : Dir.glob(File.join(Dir.getwd, 'beakers/**/*')).select { |file| !File.directory?(file) }
92
92
 
93
93
  if options['beakers']
94
94
  # if a beaker(s) defined use them
@@ -97,7 +97,7 @@ module ChemistryKit
97
97
  setup_tags(options['tag'])
98
98
  else
99
99
  # beakers default to everything
100
- beakers = Dir.glob(File.join(Dir.getwd, 'beakers/*'))
100
+ beakers = Dir.glob(File.join(Dir.getwd, 'beakers/**/*')).select { |file| !File.directory?(file) }
101
101
 
102
102
  if options['tag']
103
103
 
@@ -71,13 +71,11 @@ module ChemistryKit
71
71
  end
72
72
 
73
73
  # TODO: try to resolve this backreff thing
74
- # rubocop:disable AvoidPerlBackrefs
75
74
  def get_class_name(formula_file)
76
75
  string = formula_file.match(/(#{@formulas_dir.split('/').last}.*#{@formula})\.rb$/)[1]
77
76
  string = string.sub(/^[a-z\d]*/) { $&.capitalize }
78
- string.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }.gsub('/', '::')
77
+ string.gsub(/(?:_|(\/))([a-z\d]*)/) { "#{$1}#{$2.capitalize}" }.gsub('/', '::') # rubocop:disable PerlBackrefs
79
78
  end
80
- # rubocop:enable AvoidPerlBackrefs
81
79
 
82
80
  # "borrowed" from http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-constantize
83
81
  # TODO: this could be simplified, refactored out, or just use the activestate module some how
@@ -249,6 +249,3 @@ module ChemistryKit
249
249
  end
250
250
  end
251
251
  end
252
-
253
-
254
-
@@ -1,12 +1,8 @@
1
1
  # Default Chemisty Kit Configuration File
2
2
 
3
- base_url: http://google.com
3
+ base_url: http://google.com #change to the base url of your system under test
4
4
  retries_on_failure: 1 #defaults to 1, set the number of times a test should be retried on failure
5
5
  concurrency: 1
6
- log:
7
- path: #you may override the default log path 'evidence'
8
- results_file: #you may override the default file name 'results_junit.xml'
9
- format: #you may override the default format 'junit'
10
6
  selenium_connect:
11
7
  #Setup & Debugging
12
8
  jar:
@@ -29,3 +25,15 @@ selenium_connect:
29
25
  os:
30
26
  browser_version:
31
27
  job_name:
28
+
29
+ # Uncomment the below to set up a basic authentication call for your tests
30
+ # basic_auth:
31
+ # username: 'user'
32
+ # password: 'pass'
33
+ # http_path: '/basic'
34
+ # https_path: '/secure'
35
+
36
+ # Uncomment the below if you use optimizely in your test environment and want to opt out of it
37
+ # split_testing:
38
+ # provider: 'optimizely'
39
+ # opt_out: true
@@ -12,7 +12,8 @@ describe ChemistryKit::Config::BasicAuth do
12
12
  VALID_HTTPS_PATH = '/secure'
13
13
 
14
14
  before(:each) do
15
- @opts = { username: VALID_USERNAME,
15
+ @opts = {
16
+ username: VALID_USERNAME,
16
17
  password: VALID_PASSWORD,
17
18
  base_url: VALID_URL,
18
19
  http_path: VALID_HTTP_PATH,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chemistrykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.1
4
+ version: 3.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-08-26 00:00:00.000000000 Z
13
+ date: 2013-09-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: 2.29.0
70
+ version: 2.35.1
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 2.29.0
78
+ version: 2.35.1
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: rest-client
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ dependencies:
204
204
  - - ~>
205
205
  - !ruby/object:Gem::Version
206
206
  version: 0.5.2
207
- description: small fix to gemfile
207
+ description: Merged various pull requests including subfolders in beaker directory
208
208
  email:
209
209
  - dave@arrgyle.com
210
210
  - jason@arrgyle.com
@@ -215,10 +215,10 @@ extra_rdoc_files: []
215
215
  files:
216
216
  - .coveralls.yml
217
217
  - .gitignore
218
+ - .rbenv-version
218
219
  - .rspec
219
220
  - .rubocop.yml
220
221
  - .ruby-gemset
221
- - .ruby-version
222
222
  - .travis.yml
223
223
  - CHANGELOG.md
224
224
  - CONTRIBUTORS.md
@@ -352,12 +352,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
352
352
  - - ! '>='
353
353
  - !ruby/object:Gem::Version
354
354
  version: '0'
355
- segments:
356
- - 0
357
- hash: -219025540182541966
358
355
  requirements: []
359
356
  rubyforge_project:
360
- rubygems_version: 1.8.25
357
+ rubygems_version: 1.8.23
361
358
  signing_key:
362
359
  specification_version: 3
363
360
  summary: A simple and opinionated web testing framework for Selenium that follows
@@ -1 +0,0 @@
1
- ruby-1.9.3