-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathan_executable.rb
More file actions
81 lines (57 loc) · 2.12 KB
/
an_executable.rb
File metadata and controls
81 lines (57 loc) · 2.12 KB
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
shared_examples 'an executable' do
describe '.namespace' do
after { described_class.remove_instance_variable(:@namespace) }
it 'gets current namespace' do
described_class.instance_variable_set(:@namespace, :test)
expect(described_class.namespace).to eq(:test)
end
it 'sets new namespace' do
described_class.namespace(:test)
expect(described_class.instance_variable_get(:@namespace)).to eq(:test)
end
end
describe '.task_queue' do
after { described_class.remove_instance_variable(:@task_queue) }
it 'gets current task list' do
described_class.instance_variable_set(:@task_queue, :test)
expect(described_class.task_queue).to eq(:test)
end
it 'sets new task list' do
described_class.task_queue(:test)
expect(described_class.instance_variable_get(:@task_queue)).to eq(:test)
end
end
describe '.retry_policy' do
after { described_class.remove_instance_variable(:@retry_policy) }
it 'gets current retry policy' do
described_class.instance_variable_set(:@retry_policy, :test)
expect(described_class.retry_policy).to eq(:test)
end
it 'sets new valid retry policy' do
described_class.retry_policy(:test)
expect(described_class.instance_variable_get(:@retry_policy)).to eq(:test)
end
end
describe '.timeouts' do
after { described_class.remove_instance_variable(:@timeouts) }
it 'gets current timeouts' do
described_class.instance_variable_set(:@timeouts, :test)
expect(described_class.timeouts).to eq(:test)
end
it 'sets new timeouts' do
described_class.timeouts(:test)
expect(described_class.instance_variable_get(:@timeouts)).to eq(:test)
end
end
describe '.priority' do
after { described_class.remove_instance_variable(:@priority) }
it 'gets current priority' do
described_class.instance_variable_set(:@priority, :test)
expect(described_class.priority).to eq(:test)
end
it 'sets new priority' do
described_class.priority(:test)
expect(described_class.instance_variable_get(:@priority)).to eq(:test)
end
end
end