rubbish_code 1.1.1 → 1.1.2

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
  SHA256:
3
- metadata.gz: 8977c1f85f3d3c5a73e2d51cdf33e7104520fb2e4a9a531e394e2e6645af8ff3
4
- data.tar.gz: 84ba679d683b6a3f43b5bc3f488c793c199bba66480fb4844b9d31f8e8b2cbf4
3
+ metadata.gz: bcca354a4ed34bf8fadbca3bea1446428d093658c6e04a9a9e55392519595c2a
4
+ data.tar.gz: 8e2050f98952c6a81f20b5d06f57daf0aebebe52a37c52274043d3d568d4ad77
5
5
  SHA512:
6
- metadata.gz: 4c8ef12b68cab719993c6284ddfa5ba6dd7d8d2a4c9f8273cc31f53a248e807dbaf43739b84173eb06987057fd75e4c1ccf13cc5d30382f6c607f85c6928d096
7
- data.tar.gz: dba57235d419c0645ca35bf425fefdfade42c187b22944b96288810f3110349ae60b78fb51040b92a4c90070f079c4dbed89afb0a173c05aad22f6bff530a546
6
+ metadata.gz: 60c01d2085635ddecf247c739ff1c66705bc790b807fb1e91d564eb67c801daad10fc14427b62d7571d4398afa581e8c300dc9b8ddd7dc141626704aa0335961
7
+ data.tar.gz: 62330e0e25cd7f637aa6c0a56d5828077ff0536e2e55ca7186f50559322d13e981b5614634e5d77ad51e2472694be8b96854da28ba298c5af464d8ab7df0c529
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubbishCode
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubbish_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Epps
@@ -48,7 +48,6 @@ files:
48
48
  - lib/source/models/student.rb
49
49
  - lib/source/models/student_base.rb
50
50
  - lib/source/models/student_short.rb
51
- - lib/source/models/student_test.rb
52
51
  - lib/source/repositories/adapters/db_source_adapter.rb
53
52
  - lib/source/repositories/adapters/file_source_adapter.rb
54
53
  - lib/source/repositories/containers/data_list.rb
@@ -65,6 +64,7 @@ files:
65
64
  - lib/source/views/student_input_form.rb
66
65
  - lib/source/views/tab_students.rb
67
66
  - rubbish_code-1.1.0.gem
67
+ - rubbish_code-1.1.1.gem
68
68
  - rubbish_code.gemspec
69
69
  - sig/ribbish_code.rbs
70
70
  homepage: https://github.com/Jakepps/Ruby_Moment
@@ -1,71 +0,0 @@
1
- require 'test/unit'
2
- require_relative 'student'
3
-
4
- class TestStudent < Test::Unit::TestCase
5
- def setup
6
- @student = Student.new('Иванов', 'Иван', 'Иванович')
7
- end
8
-
9
- def test_full_name
10
- assert_equal('Иванов Иван Иванович', @student.to_s.split(', ')[0])
11
- end
12
-
13
- def test_contacts
14
- @student = Student.new('Иванов', 'Иван', 'Иванович')
15
- @student.set_contacts(phone: '+79991234567', email: 'ivanov@example.com')
16
- assert_equal('+79991234567', @student.phone)
17
- assert_equal('ivanov@example.com', @student.email)
18
- end
19
-
20
- def test_valid_name
21
- assert(Student.valid_name?('Иванов'))
22
- assert(!Student.valid_name?('Сидоров-Петров'))
23
- assert(!Student.valid_name?('X'))
24
- assert(Student.valid_name?('Abcdefghijklmnopqrstuvwxyz'))
25
- assert(!Student.valid_name?(''))
26
- assert(!Student.valid_name?('Иванов 123'))
27
- assert(!Student.valid_name?('Иванов.'))
28
- assert(!Student.valid_name?('-Иванов'))
29
- end
30
-
31
- def test_from_hash
32
- hash = {
33
- first_name: 'Иван',
34
- last_name: 'Иванов',
35
- father_name: 'Иванович',
36
- phone: '+79991234567',
37
- telegram: 'ivanov',
38
- email: 'ivanov@example.com',
39
- git: 'ivanov'
40
- }
41
- student = Student.from_hash(hash)
42
- assert_equal(hash[:first_name], student.first_name)
43
- assert_equal(hash[:last_name], student.last_name)
44
- assert_equal(hash[:father_name], student.father_name)
45
- assert_equal(hash[:phone], student.phone)
46
- assert_equal(hash[:telegram], student.telegram)
47
- assert_equal(hash[:email], student.email)
48
- assert_equal(hash[:git], student.git)
49
- end
50
-
51
- def test_from_json_str
52
- hash = {
53
- first_name: 'Иван',
54
- last_name: 'Иванов',
55
- father_name: 'Иванович',
56
- phone: '+79991234567',
57
- telegram: 'ivanov',
58
- email: 'ivanov@example.com',
59
- git: 'ivanov'
60
- }
61
- json_str = hash.to_json
62
- student = Student.from_json_str(json_str)
63
- assert_equal(hash[:first_name], student.first_name)
64
- assert_equal(hash[:last_name], student.last_name)
65
- assert_equal(hash[:father_name], student.father_name)
66
- assert_equal(hash[:phone], student.phone)
67
- assert_equal(hash[:telegram], student.telegram)
68
- assert_equal(hash[:email], student.email)
69
- assert_equal(hash[:git], student.git)
70
- end
71
- end