yolo 1.2.5 → 1.2.7

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.
@@ -12,6 +12,8 @@ module Yolo
12
12
  attr_accessor :format
13
13
  # The directory to output the test reports
14
14
  attr_accessor :output_dir
15
+ # The device to run the tests on
16
+ attr_accessor :device
15
17
 
16
18
  #
17
19
  # Initializes the class with default settings
@@ -19,8 +21,8 @@ module Yolo
19
21
  def initialize
20
22
  self.sdk = "iphonesimulator" unless sdk
21
23
  self.format = :junit
24
+ self.device = "iphone"
22
25
  self.output_dir = "test-reports/calabash"
23
- super
24
26
  end
25
27
 
26
28
  #
@@ -34,7 +36,7 @@ module Yolo
34
36
  task :test do
35
37
  xcodebuild :clean
36
38
  xcodebuild :build
37
- Yolo::Tools::Ios::Calabash.run(format, output_dir)
39
+ Yolo::Tools::Ios::Calabash.run(format, output_dir, device)
38
40
  end
39
41
  end
40
42
  end
@@ -15,8 +15,8 @@ module Yolo
15
15
  # @param output_dir = "test-reports/cucumber" [String] Folder destination to output the test reports to
16
16
  #
17
17
  # @return [type] [description]
18
- def self.run(format = :junit, output_dir = "test-reports/cucumber")
19
- IO.popen("cucumber --format #{format.to_s} --out #{output_dir}") do |io|
18
+ def self.run(format = :junit, output_dir = "test-reports/cucumber", device = "iphone")
19
+ IO.popen("cucumber --format #{format.to_s} --out #{output_dir} DEVICE=#{device}") do |io|
20
20
  begin
21
21
  while line = io.readline
22
22
  puts line
@@ -15,6 +15,10 @@ describe Yolo::Tasks::Ios::Calabash do
15
15
  @calabash.sdk.should eq("iphonesimulator")
16
16
  end
17
17
 
18
+ it "should set iphone as the default device" do
19
+ @calabash.device.should eq("iphone")
20
+ end
21
+
18
22
  it "should set test-reports/calabash as the default output directory" do
19
23
  @calabash.output_dir.should eq("test-reports/calabash")
20
24
  end
@@ -25,11 +25,16 @@ describe Yolo::Tools::Ios::Calabash do
25
25
  Yolo::Tools::Ios::Calabash.run()
26
26
  end
27
27
 
28
- it "pass test-reports/cucumber as the default output directory" do
28
+ it "should pass test-reports/cucumber as the default output directory" do
29
29
  IO.should_receive(:popen).with(/--out test-reports\/cucumber/)
30
30
  Yolo::Tools::Ios::Calabash.run()
31
31
  end
32
32
 
33
+ it "should pass iphone as the default device" do
34
+ IO.should_receive(:popen).with(/DEVICE=iphone/)
35
+ Yolo::Tools::Ios::Calabash.run()
36
+ end
37
+
33
38
  it "should output to STDOUT" do
34
39
  @io.stub(:readline).and_return("testline", nil)
35
40
  Yolo::Tools::Ios::Calabash.should_receive(:puts).with("testline")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-05 00:00:00.000000000 Z
12
+ date: 2013-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xcodebuild-rb