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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 545789382fc2c6d31f47e46bd32ae536a0dfcbf4
4
- data.tar.gz: b4519a8cac19af04fd80f80a7f0f68c9e0d0c013
3
+ metadata.gz: a6fea0cac9a6c695e3351025b7873f65b831d396
4
+ data.tar.gz: 333ba737977d1df335aead0437eb923f6a8c2b72
5
5
  SHA512:
6
- metadata.gz: 767c803c3a5cf0bc1e194143097813e0c792f44016cc22f35f9bed0b02c0296914003397460d70f74689f8142069cb7907d1a0c6de8981e9f3d53b606f3ff5c7
7
- data.tar.gz: c9450d753c55841ba95e91fbf19e017b710d57a10e8dcca646de3a121f3979be8ad83a82ab1de69ff21751e041d4721b7f4f097e277479c35324cfcbe91d5c91
6
+ metadata.gz: 535e3e64ac7f3e18a60b095b1e9576d3d26189e9f12c0e9b6e5144d9874d72d7571d7ce3c366fe09b9c3947bf7440a8617a9ffd5e4dd3a82efebabcdd00bdaa7
7
+ data.tar.gz: a2b968b1a239498bfffcd15a50f63d63e5f4b9fdfffd4c076d180127521ee519b7f48b0c3db48c7c945fb30613f276eb70a62473a2a7536d8ac54a8e203d83e1
@@ -8,6 +8,9 @@ module Watwa
8
8
 
9
9
  # Builds a table containing the forecast
10
10
  class Table
11
+ # Table array that holds forecast
12
+ attr_accessor :table
13
+
11
14
  def initialize
12
15
  @table = TTY::Table.new header: ['Day',
13
16
  'Temp ' + 176.chr(UTF_8) + 'C',
@@ -1,10 +1,22 @@
1
- require "./lib/NAME.rb"
2
- require "test/unit"
1
+ require_relative '../lib/watwa/main.rb'
2
+ require 'test/unit'
3
3
 
4
- class TestNAME < Test::Unit::TestCase
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
- def test_sample
7
- assert_equal(4, 2+2)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Robertson