Sha256: a4f2b6ddf2ea7951057e9dcd2c50a48ffb000853fa6d5f20f531e812cba5c68b
Contents?: true
Size: 1.93 KB
Versions: 8
Compression:
Stored size: 1.93 KB
Contents
require 'test/unit' require 'thor' require 'fileutils' require 'xamarin-test-cloud/cli' class TestParser < Test::Unit::TestCase def test_should_raise_if_no_app_or_api_key_is_given config_options = { 'devices' => "aa59649c", } script = XamarinTestCloud::CLI.new([], config_options) assert_raise Thor::InvocationError do script.invoke(:submit) end script = XamarinTestCloud::CLI.new(["test/ipa/2012 Olympics_cal.ipa"], config_options) assert_raise Thor::InvocationError do script.invoke(:submit) end end def test_should_raise_if_app_is_not_file_ipa_or_apk config_options = { 'devices' => "aa59649c", } script = XamarinTestCloud::CLI.new(["test/ipa/NONE_EXIST_2012 Olympics_cal.ipa","JIFZCTPZJJXJLEKMMYRY"], config_options) assert_raise XamarinTestCloud::ValidationError do script.invoke(:submit) end script = XamarinTestCloud::CLI.new(["test/ipa/features.zip","JIFZCTPZJJXJLEKMMYRY"], config_options) assert_raise XamarinTestCloud::ValidationError do script.invoke(:submit) end end def test_should_parse_all_configuration_options FileUtils.rm_f(File.join("test","vendor")) FileUtils.rm_f(File.join("test","Gemfile")) FileUtils.rm_f(File.join("test","Gemfile.lock")) config_options = { :host => "http://localhost:8080", :workspace => "test/ipa", :features => "test/ipa/features.zip", :config => "test/config/cucumber.yml", :profile => "a", 'devices' => "aa59649c", "skip-check" => false, "reset-between-scenarios" => false, "dry-run" => true } script = XamarinTestCloud::CLI.new(["test/ipa/2012 Olympics_cal.ipa","JIFZCTPZJJXJLEKMMYRY"],config_options) script.invoke(:submit) FileUtils.rm_f(File.join("test","vendor","cache")) FileUtils.rm_f(File.join("test","Gemfile")) FileUtils.rm_f(File.join("test","Gemfile.lock")) end end
Version data entries
8 entries across 8 versions & 1 rubygems