forked from flapjack/flapjack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotifier_options_spec.rb
115 lines (115 loc) · 4.17 KB
/
notifier_options_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
##!/usr/bin/env ruby
##
#require File.join(File.dirname(__FILE__), '..', 'lib', 'flapjack', 'cli', 'notifier')
#
#describe Flapjack::Notifier::Options do
#
# # beanstalk
# it "should accept the location of a beanstalk queue in short form" do
# args = %w(-b localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.host.should == "localhost"
# end
#
# it "should accept the location of a beanstalk queue in long form" do
# args = %w(--beanstalk localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.host.should == "localhost"
# end
#
# it "should set a default beanstalk host" do
# args = %w(-r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.host.should == 'localhost'
# end
#
# # beanstalk port
# it "should accept a specified beanstalk port in short form" do
# args = %w(-b localhost -p 11340 -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.port.should == 11340
# end
#
# it "should accept a specified beanstalk port in long form" do
# args = %w(-b localhost --port 11399 -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.port.should == 11399
# end
#
# it "should set a default beanstalk port" do
# args = %w(-b localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.port.should == 11300
# end
#
# # recipients
# it "should accept the location of a recipients file in short form" do
# args = %w(-b localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.recipients.should == "spec/recipients.yaml"
# end
#
# it "should accept the location of a recipients file in long form" do
# args = %w(-b localhost --recipient spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.recipients.should == "spec/recipients.yaml"
# end
#
# it "should exit if the recipients file doesn't exist" do
# args = %w(-b localhost -r spec/wangity.yaml -c spec/flapjack-notifier.yaml)
# lambda {
# Flapjack::Notifier::Options.parse(args)
# }.should raise_error(SystemExit)
# end
#
# it "should exit if the recipients file isn't specified" do
# args = %w(-b localhost -c spec/flapjack-notifier.yaml)
# lambda {
# Flapjack::Notifier::Options.parse(args)
# }.should raise_error(SystemExit)
# end
#
# # config
# it "should accept the location of a config file in short form" do
# args = %w(-b localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.config_filename.should == "spec/flapjack-notifier.yaml"
# end
#
# it "should accept the location of a config file in long form" do
# args = %w(-b localhost -r spec/recipients.yaml --config spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.config_filename.should == "spec/flapjack-notifier.yaml"
# end
#
# it "should provide a default config file if not specified" do
# args = %w(-b localhost -r spec/recipients.yaml -c spec/flapjack-notifier.yaml)
# options = Flapjack::Notifier::Options.parse(args)
# options.config_filename.should_not be_nil
# end
#
# it "should exit if the config file doesn't exist" do
# args = %w(-b localhost --config spec/wangity.yaml)
# lambda {
# Flapjack::Notifier::Options.parse(args)
# }.should raise_error(SystemExit)
# end
#
# # general
# it "should exit when asked for help in short form" do
# args = %w(-h)
# lambda {
# Flapjack::Notifier::Options.parse(args)
# }.should raise_error(SystemExit)
# end
#
# it "should exit when asked for help in long form" do
# args = %w(--help)
# lambda {
# Flapjack::Notifier::Options.parse(args)
# }.should raise_error(SystemExit)
# end
#end
#
#
#def puts(*args) ; end