test_sweet 0.1.0 → 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: 95a1fa5ce2c8c9d7bb64bca93da6eafa224e9238
4
- data.tar.gz: e05cfafbd044d0458b578771ca8ad328d8a77685
3
+ metadata.gz: fa037b5508e7a932d1db0aa3efdb71eab2351454
4
+ data.tar.gz: 530e641e4072185b2f9a95c8786d7b8c2338bb4e
5
5
  SHA512:
6
- metadata.gz: fcbbc76a7dec0d932f58adfca01bc9ff8f45cc0bb9fbf56a5943d59a8b387564ae60abf802987dcd9463dce64f453d60d8566aebd0199fc68d5baca5c75618c9
7
- data.tar.gz: e3aa07233a4af24919e234957dede1d8fce4de6721a7a63637ac1c07895f32ca74bccecbd328f2805d367f9717f738d61b540aed6756c60b38705da5785df813
6
+ metadata.gz: d6a429067513568cd14df7b72dad7e5fdd109beff040fe129b47ca7e0aa01cdf68a393ab7ba582b946b9f0a1a556140bf586d30e6c7fde429fa4717b91c0a747
7
+ data.tar.gz: e3769f53a61baea01b3fcd434b0e3651b8c26f8c5ab8fa6367ca407a3c633b6000feba5b3f7fdc3ef504f55ce496a7b47c70ce1ef97bb359c7b93c30f491218a
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Integration testing your RubyMotion applications the simple and sweet way.
4
4
 
5
+ ## Requirements
6
+
7
+ - Test Sweet uses [Appium](https://github.com/appium/appium#quick-start) for driving your integration tests.
8
+ - Head on over there and install based on the instructions they have provided.
9
+
5
10
  ## Installation
6
11
 
7
12
  Add this line to your application's Gemfile:
@@ -13,12 +18,10 @@ And then execute:
13
18
  $ bundle
14
19
  $ rake test_sweet
15
20
 
16
- Or install it yourself as:
17
-
18
- $ gem install test_sweet
19
-
20
21
  ## Usage
21
22
 
23
+ Start the Appium server
24
+
22
25
  After you have initialized your Test Sweet you can add new features and run them with the same command.
23
26
 
24
27
  $ rake test_sweet
@@ -1,11 +1,9 @@
1
1
  namespace :test_sweet do
2
2
  desc "Initial setup of Test Sweet"
3
3
  task :initialize do
4
- if TestSweet.verify_initialized
5
- puts "TestSweet seems to already be initialized, start testing!"
6
- else
4
+ if !TestSweet.verify_initialized
7
5
  TestSweet.init
8
- puts "TestSweet has been setup, write your features and run again!"
6
+ puts "TestSweet has been setup, write your features and start testing!"
9
7
  end
10
8
  end
11
9
 
@@ -17,7 +15,7 @@ namespace :test_sweet do
17
15
  task :run do
18
16
  if TestSweet.verify_initialized
19
17
  Rake::Task["test_sweet:prepare"].invoke
20
- ENV['test_sweet-target'] = Motion::Project::App.config.deployment_target
18
+ ENV['test_sweet-target'] = Motion::Project::App.config.deployment_target || ENV['target']
21
19
  ENV['test_sweet-app'] = Motion::Project::App.config.app_bundle('iPhoneSimulator')
22
20
  ENV['test_sweet-device-name'] = Motion::Project::App.config.device_family_string(
23
21
  ENV['device'],
@@ -27,7 +25,7 @@ namespace :test_sweet do
27
25
 
28
26
  exec("cucumber")
29
27
  else
30
- Rake::Task["test_sweet:initialize"].invoke
28
+ puts "TestSweet is not initialized; please run: `rake test_sweet:initialize`"
31
29
  end
32
30
  end
33
31
  end
@@ -0,0 +1,30 @@
1
+ require 'rspec'
2
+ require 'appium_lib'
3
+ require 'cucumber/ast'
4
+ require 'motion-juxtapose'
5
+ require "test_sweet/core_steps"
6
+ require "test_sweet/screenshotting_steps"
7
+
8
+ Juxtapose::AppiumStrategy.setup
9
+
10
+ # Create a custom World class so we don't pollute `Object` with Appium methods
11
+ class AppiumWorld; end
12
+
13
+ caps = {
14
+ caps: {
15
+ platformName: "ios",
16
+ platformVersion: ENV['test_sweet-target'],
17
+ app: ENV['test_sweet-app'],
18
+ deviceName: ENV['test_sweet-device-name']
19
+ }
20
+ }
21
+ Appium::Driver.new(caps)
22
+
23
+ Appium.promote_appium_methods AppiumWorld
24
+
25
+ World do
26
+ AppiumWorld.new
27
+ end
28
+
29
+ Before { $driver.start_driver }
30
+ After { $driver.driver_quit }
File without changes
@@ -1,3 +1,3 @@
1
1
  class TestSweet
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/test_sweet.rb CHANGED
@@ -11,11 +11,9 @@ class TestSweet
11
11
  gem_root = spec.gem_dir
12
12
 
13
13
  files = [
14
- 'features/support/env.rb',
15
- 'features/step_definitions/core_steps.rb',
14
+ 'features/example.feature',
16
15
  'features/step_definitions/example_steps.rb',
17
- 'features/step_definitions/screenshotting_steps.rb',
18
- 'features/example.feature'
16
+ 'features/support/env.rb'
19
17
  ]
20
18
 
21
19
  files.each do |f|
@@ -1,28 +1 @@
1
- require 'rspec'
2
- require 'appium_lib'
3
- require 'cucumber/ast'
4
- require 'motion-juxtapose'
5
-
6
- Juxtapose::AppiumStrategy.setup
7
-
8
- # Create a custom World class so we don't pollute `Object` with Appium methods
9
- class AppiumWorld; end
10
-
11
- caps = {
12
- caps: {
13
- platformName: "ios",
14
- platformVersion: ENV['target'],
15
- app: ENV['test_sweet-app'],
16
- deviceName: ENV['test_sweet-device-name']
17
- }
18
- }
19
- Appium::Driver.new(caps)
20
-
21
- Appium.promote_appium_methods AppiumWorld
22
-
23
- World do
24
- AppiumWorld.new
25
- end
26
-
27
- Before { $driver.start_driver }
28
- After { $driver.driver_quit }
1
+ require 'test_sweet/cucumber_env'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_sweet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Larrabee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appium_lib
@@ -111,23 +111,17 @@ files:
111
111
  - LICENSE.txt
112
112
  - README.md
113
113
  - Rakefile
114
- - app/app_delegate.rb
115
114
  - bin/console
116
115
  - bin/setup
117
116
  - lib/tasks/test_sweet.rb
118
117
  - lib/test_sweet.rb
118
+ - lib/test_sweet/core_steps.rb
119
+ - lib/test_sweet/cucumber_env.rb
120
+ - lib/test_sweet/provided_steps.rb
121
+ - lib/test_sweet/screenshotting_steps.rb
119
122
  - lib/test_sweet/version.rb
120
- - resources/Default-568h@2x.png
121
- - templates/CODE_OF_CONDUCT.md
122
- - templates/Gemfile
123
- - templates/Gemfile.lock
124
- - templates/LICENSE.txt
125
- - templates/README.md
126
- - templates/Rakefile
127
123
  - templates/features/example.feature
128
- - templates/features/step_definitions/core_steps.rb
129
124
  - templates/features/step_definitions/example_steps.rb
130
- - templates/features/step_definitions/screenshotting_steps.rb
131
125
  - templates/features/support/env.rb
132
126
  - test_sweet.gemspec
133
127
  homepage: https://github.com/squidpunch/test_sweet
data/app/app_delegate.rb DELETED
@@ -1,5 +0,0 @@
1
- class AppDelegate
2
- def application(application, didFinishLaunchingWithOptions:launchOptions)
3
- true
4
- end
5
- end
Binary file
@@ -1,13 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
-
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
-
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
-
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
-
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/templates/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in sabram.gemspec
4
- gemspec
@@ -1,88 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sabram (0.1.8)
5
- appium_lib (>= 7.0)
6
- cucumber (>= 2.0)
7
- motion-juxtapose (>= 0.3)
8
- rspec (>= 3.3.0)
9
-
10
- GEM
11
- remote: https://rubygems.org/
12
- specs:
13
- appium_lib (7.0.0)
14
- awesome_print (~> 1.6)
15
- json (~> 1.8)
16
- nokogiri (~> 1.6.6)
17
- selenium-webdriver (~> 2.45)
18
- toml (~> 0.0)
19
- awesome_print (1.6.1)
20
- blankslate (2.1.2.4)
21
- builder (3.2.2)
22
- childprocess (0.5.6)
23
- ffi (~> 1.0, >= 1.0.11)
24
- cucumber (2.0.0)
25
- builder (>= 2.1.2)
26
- cucumber-core (~> 1.1.3)
27
- diff-lcs (>= 1.1.3)
28
- gherkin (~> 2.12)
29
- multi_json (>= 1.7.5, < 2.0)
30
- multi_test (>= 0.1.2)
31
- cucumber-core (1.1.3)
32
- gherkin (~> 2.12.0)
33
- diff-lcs (1.2.5)
34
- ffi (1.9.10)
35
- gherkin (2.12.2)
36
- multi_json (~> 1.3)
37
- haml (4.0.6)
38
- tilt
39
- json (1.8.3)
40
- mini_portile (0.6.2)
41
- motion-juxtapose (0.3.1)
42
- haml
43
- sinatra (~> 1.4)
44
- multi_json (1.11.2)
45
- multi_test (0.1.2)
46
- nokogiri (1.6.6.2)
47
- mini_portile (~> 0.6.0)
48
- parslet (1.5.0)
49
- blankslate (~> 2.0)
50
- rack (1.6.4)
51
- rack-protection (1.5.3)
52
- rack
53
- rake (10.4.2)
54
- rspec (3.3.0)
55
- rspec-core (~> 3.3.0)
56
- rspec-expectations (~> 3.3.0)
57
- rspec-mocks (~> 3.3.0)
58
- rspec-core (3.3.1)
59
- rspec-support (~> 3.3.0)
60
- rspec-expectations (3.3.0)
61
- diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.3.0)
63
- rspec-mocks (3.3.1)
64
- diff-lcs (>= 1.2.0, < 2.0)
65
- rspec-support (~> 3.3.0)
66
- rspec-support (3.3.0)
67
- rubyzip (1.1.7)
68
- selenium-webdriver (2.46.2)
69
- childprocess (~> 0.5)
70
- multi_json (~> 1.0)
71
- rubyzip (~> 1.0)
72
- websocket (~> 1.0)
73
- sinatra (1.4.6)
74
- rack (~> 1.4)
75
- rack-protection (~> 1.4)
76
- tilt (>= 1.3, < 3)
77
- tilt (2.0.1)
78
- toml (0.1.2)
79
- parslet (~> 1.5.0)
80
- websocket (1.2.2)
81
-
82
- PLATFORMS
83
- ruby
84
-
85
- DEPENDENCIES
86
- bundler (~> 1.9)
87
- rake (~> 10.0)
88
- sabram!
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 David Larrabee
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/templates/README.md DELETED
@@ -1,43 +0,0 @@
1
- # Sabram
2
-
3
- Sabram helps you run integration tests against your RubyMotion application. You
4
- can install it as a system gem and run the tests with the CLI or add it in your
5
- gemfile and run the tests with the provided rake task
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'sabram'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install sabram
22
-
23
- ## Usage
24
-
25
- ```
26
- sabram --init
27
- # run your appium server
28
- sabram
29
- ```
30
-
31
- ## Development
32
-
33
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
34
-
35
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
36
-
37
- ## Contributing
38
-
39
- 1. Fork it ( https://github.com/[my-github-username]/sabram/fork )
40
- 2. Create your feature branch (`git checkout -b my-new-feature`)
41
- 3. Commit your changes (`git commit -am 'Add some feature'`)
42
- 4. Push to the branch (`git push origin my-new-feature`)
43
- 5. Create a new Pull Request
data/templates/Rakefile DELETED
@@ -1 +0,0 @@
1
- require "bundler/gem_tasks"