watwa 0.0.3 → 0.0.4
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/watwa/main.rb +3 -0
- data/tests/test_watwa.rb +17 -5
- 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: a6fea0cac9a6c695e3351025b7873f65b831d396
|
4
|
+
data.tar.gz: 333ba737977d1df335aead0437eb923f6a8c2b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 535e3e64ac7f3e18a60b095b1e9576d3d26189e9f12c0e9b6e5144d9874d72d7571d7ce3c366fe09b9c3947bf7440a8617a9ffd5e4dd3a82efebabcdd00bdaa7
|
7
|
+
data.tar.gz: a2b968b1a239498bfffcd15a50f63d63e5f4b9fdfffd4c076d180127521ee519b7f48b0c3db48c7c945fb30613f276eb70a62473a2a7536d8ac54a8e203d83e1
|
data/lib/watwa/main.rb
CHANGED
data/tests/test_watwa.rb
CHANGED
@@ -1,10 +1,22 @@
|
|
1
|
-
|
2
|
-
require
|
1
|
+
require_relative '../lib/watwa/main.rb'
|
2
|
+
require 'test/unit'
|
3
3
|
|
4
|
-
class
|
4
|
+
# Test class for all watwa classes and methods
|
5
|
+
class TestWatwa < Test::Unit::TestCase
|
6
|
+
# Tests for the table class
|
7
|
+
def test_table
|
8
|
+
test_table = Watwa::Table.new
|
9
|
+
test_table.build_table
|
5
10
|
|
6
|
-
|
7
|
-
assert_equal
|
11
|
+
assert_equal test_table.table.class, TTY::Table
|
12
|
+
assert_equal 32, test_table.convert_to_fahrenheit(0)
|
13
|
+
assert_equal 68, test_table.convert_to_fahrenheit(20)
|
8
14
|
end
|
9
15
|
|
16
|
+
# Tests for the Forecast class
|
17
|
+
def test_forecast
|
18
|
+
test_forecast = Watwa::Forecast.new
|
19
|
+
|
20
|
+
assert_equal test_forecast.class, Watwa::Forecast
|
21
|
+
end
|
10
22
|
end
|