torasup 0.0.6 → 0.0.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.
- checksums.yaml +4 -4
- data/lib/torasup/test/helpers.rb +0 -28
- data/lib/torasup/version.rb +1 -1
- data/spec/support/pstn_helpers.rb +25 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dbd5a2adc5614dce03ce4d40f2e98ddab6b06f1
|
4
|
+
data.tar.gz: 28562f9426b2ae900c513865c410f08e24473210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c422d74526c12d04d2db42e69c871df37ec2a7da73845130d08b49bdd6291e4e76efdf43bfbf8bb8ef4225b6b65635dfe6a9ab828161e9fd6c8fa9dfb08ded50
|
7
|
+
data.tar.gz: 64527d7bdbbdfe6ab02762ff7958802d782f5e211b91bd7ab9d1d67fa5a3f159e683a79a1e496f8aadfda6d9589f8769c244b4bed2bcc291cbcd8ea0fce73e77
|
data/lib/torasup/test/helpers.rb
CHANGED
@@ -1,34 +1,6 @@
|
|
1
1
|
module Torasup
|
2
2
|
module Test
|
3
3
|
module Helpers
|
4
|
-
|
5
|
-
RSpec.configure do |config|
|
6
|
-
config.before do
|
7
|
-
clear_pstn
|
8
|
-
clear_registered_operators
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
private
|
13
|
-
|
14
|
-
def clear_pstn
|
15
|
-
Torasup.configure do |config|
|
16
|
-
config.custom_pstn_data_file = nil
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def clear_registered_operators
|
21
|
-
Torasup.configure do |config|
|
22
|
-
config.registered_operators = {}
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def configure_registered_operators(country_id, *operators)
|
27
|
-
Torasup.configure do |config|
|
28
|
-
config.register_operators(country_id, *operators)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
4
|
def yaml_file(filename)
|
33
5
|
raise "Override this method to return the full path of the yaml spec"
|
34
6
|
end
|
data/lib/torasup/version.rb
CHANGED
@@ -1,12 +1,37 @@
|
|
1
1
|
module PstnHelpers
|
2
2
|
include Torasup::Test::Helpers
|
3
3
|
|
4
|
+
RSpec.configure do |config|
|
5
|
+
config.before do
|
6
|
+
clear_pstn
|
7
|
+
clear_registered_operators
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
4
11
|
private
|
5
12
|
|
6
13
|
def yaml_file(filename)
|
7
14
|
File.join(File.dirname(__FILE__), "../../spec/support/#{filename}")
|
8
15
|
end
|
9
16
|
|
17
|
+
def clear_pstn
|
18
|
+
Torasup.configure do |config|
|
19
|
+
config.custom_pstn_data_file = nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def clear_registered_operators
|
24
|
+
Torasup.configure do |config|
|
25
|
+
config.registered_operators = {}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def configure_registered_operators(country_id, *operators)
|
30
|
+
Torasup.configure do |config|
|
31
|
+
config.register_operators(country_id, *operators)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
10
35
|
def configure_with_custom_data
|
11
36
|
Torasup.configure do |config|
|
12
37
|
config.custom_pstn_data_file = File.join(File.dirname(__FILE__), "../support", "/custom_pstn.yaml")
|