test_sweet 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/bin/test_sweet +22 -0
- data/lib/tasks/test_sweet.rb +14 -7
- data/lib/test_sweet/version.rb +1 -1
- data/lib/test_sweet.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f456b282e542f1c05a02fa9a0dcc759c800283b3
|
4
|
+
data.tar.gz: bf9f7de31605d2d29bb0a215b935d42fda16c652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd54ccc48565a3ea75e82e4eb1c608a06d6634048efb8b6d015e5f4c53f0172d3afe6509944729e540d5fd0b2fec05277717e1aa92a1d831db3bb330b5e0f8e
|
7
|
+
data.tar.gz: 48c434d57017435d9f08d56f9d6c6333f86317becfa4adbbfa37c9ddab231826337bbd7ed0324dff7ca779b4f2726308ee524d804b385ab6a3691dc3cea01516
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Integration testing your RubyMotion applications the simple and sweet way.
|
|
4
4
|
|
5
5
|
## Requirements
|
6
6
|
|
7
|
-
- Test Sweet uses [Appium](https://github.com/appium/appium#quick-start) for driving your integration tests.
|
7
|
+
- **Test Sweet** uses [Appium](https://github.com/appium/appium#quick-start) for driving your integration tests.
|
8
8
|
- Head on over there and install based on the instructions they have provided.
|
9
9
|
|
10
10
|
## Installation
|
@@ -23,7 +23,7 @@ And then execute:
|
|
23
23
|
Start the Appium server
|
24
24
|
|
25
25
|
You can build and run your app together in one call
|
26
|
-
After you have initialized your Test Sweet you can add new features and run them with the provided rake task.
|
26
|
+
After you have initialized your **Test Sweet** you can add new features and run them with the provided rake task.
|
27
27
|
|
28
28
|
$ rake test_sweet
|
29
29
|
|
@@ -31,6 +31,10 @@ Or if you prefer to pre-build your app with some setup on your side, you can jus
|
|
31
31
|
|
32
32
|
$ rake test_sweet:run
|
33
33
|
|
34
|
+
Finally you can also use the CLI runner to run your features not using rake
|
35
|
+
|
36
|
+
$ test_sweet
|
37
|
+
|
34
38
|
## Contributing
|
35
39
|
|
36
40
|
1. Fork it
|
data/bin/test_sweet
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
class TestSweetCommandLine
|
4
|
+
def self.help
|
5
|
+
%{ Use Test Sweet to run all your integration tests.
|
6
|
+
Try some of these usage examples:
|
7
|
+
|
8
|
+
> test_sweet # build and run all your features
|
9
|
+
> test_sweet features/you_made.feature #runs the features/you_made feature file
|
10
|
+
> test_sweet features/you_made.feature:13 #runs the scenario on line 13 of features/you_made feature file
|
11
|
+
}
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
action = ARGV[0]
|
16
|
+
|
17
|
+
case action
|
18
|
+
when "help"
|
19
|
+
puts TestSweetCommandLine.help
|
20
|
+
else
|
21
|
+
system("FEATURES=#{ARGV.join(" ")} rake test_sweet:run")
|
22
|
+
end
|
data/lib/tasks/test_sweet.rb
CHANGED
@@ -12,20 +12,27 @@ namespace :test_sweet do
|
|
12
12
|
if TestSweet.verify_initialized
|
13
13
|
ENV['test_sweet-target'] = Motion::Project::App.config.deployment_target || ENV['target']
|
14
14
|
ENV['test_sweet-app'] = Motion::Project::App.config.app_bundle('iPhoneSimulator')
|
15
|
-
ENV['test_sweet-device-name'] = Motion::Project::App.config.device_family_string(
|
16
|
-
ENV['device'],
|
17
|
-
Motion::Project::App.config.device_family_ints[0],
|
18
|
-
ENV['test_sweet-target'],
|
19
|
-
ENV['retina'])
|
20
15
|
|
21
|
-
|
16
|
+
if !File.exists? ENV['test_sweet-app']
|
17
|
+
puts "No application at #{ENV['test_sweet-app']} - please build your app!"
|
18
|
+
else
|
19
|
+
ENV['test_sweet-device-name'] = Motion::Project::App.config.device_family_string(
|
20
|
+
ENV['device'],
|
21
|
+
Motion::Project::App.config.device_family_ints[0],
|
22
|
+
ENV['test_sweet-target'],
|
23
|
+
ENV['retina'])
|
24
|
+
Cucumber::Rake::Task.new(:features, "") do |t|
|
25
|
+
t.cucumber_opts = "--format pretty #{ENV["FEATURES"] || "features"}"
|
26
|
+
end.runner.run
|
27
|
+
end
|
22
28
|
else
|
23
29
|
puts "TestSweet is not initialized; please run: `rake test_sweet:initialize`"
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
33
|
+
|
27
34
|
desc "Build your app and run integration tests"
|
28
35
|
task :test_sweet do
|
29
36
|
Rake::Task["build:simulator"].invoke
|
30
|
-
Rake::Task["test_sweet:run"].invoke
|
37
|
+
Rake::Task["test_sweet:run"].invoke
|
31
38
|
end
|
data/lib/test_sweet/version.rb
CHANGED
data/lib/test_sweet.rb
CHANGED
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.
|
4
|
+
version: 0.4.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-
|
11
|
+
date: 2015-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib
|
@@ -101,6 +101,7 @@ email:
|
|
101
101
|
executables:
|
102
102
|
- console
|
103
103
|
- setup
|
104
|
+
- test_sweet
|
104
105
|
extensions: []
|
105
106
|
extra_rdoc_files: []
|
106
107
|
files:
|
@@ -113,6 +114,7 @@ files:
|
|
113
114
|
- Rakefile
|
114
115
|
- bin/console
|
115
116
|
- bin/setup
|
117
|
+
- bin/test_sweet
|
116
118
|
- lib/tasks/test_sweet.rb
|
117
119
|
- lib/test_sweet.rb
|
118
120
|
- lib/test_sweet/core_steps.rb
|