shnaider_code 2.0.0 → 2.0.1
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/shnaider_code/version.rb +1 -1
 - data/shnaider_code-2.0.0.gem +0 -0
 - metadata +2 -2
 - data/lib/source/students_tests.rb +0 -72
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1e7944c0fb66d7ce5ffc5da0ae8f27590d90fd9fe4e00983d64f44d295f61b60
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f15a4a429ddb7d71d44e8867c23956ec7fd1aa77781a5bf4e5e9fa15a1fd27f7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 27e403d2dbe4138fb7aa1bf04c0b64b86e3e17d0b9b74fdc7742450f2e60845038120870a1b5ac359db9579c4735ee348366ca6dcffdee5a7e363e4b581b5bde
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: bc8fb225ba066038cdddb7c342d695e10bbdda16a14037c03ed09087b9228f5f79e09b319e350614345634d0f03403bc6606c50947f1e6d9a02c2d9c9447c876
         
     | 
| 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: shnaider_code
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Iya
         
     | 
| 
         @@ -52,7 +52,7 @@ files: 
     | 
|
| 
       52 
52 
     | 
    
         
             
            - lib/source/students_list.rb
         
     | 
| 
       53 
53 
     | 
    
         
             
            - lib/source/students_list_adapter.rb
         
     | 
| 
       54 
54 
     | 
    
         
             
            - lib/source/students_list_format_strategy.rb
         
     | 
| 
       55 
     | 
    
         
            -
            -  
     | 
| 
      
 55 
     | 
    
         
            +
            - shnaider_code-2.0.0.gem
         
     | 
| 
       56 
56 
     | 
    
         
             
            - shnaider_code.gemspec
         
     | 
| 
       57 
57 
     | 
    
         
             
            homepage: https://github.com/bushmrz/learning-patterns-with-ruby
         
     | 
| 
       58 
58 
     | 
    
         
             
            licenses:
         
     | 
| 
         @@ -1,72 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require "test/unit"
         
     | 
| 
       2 
     | 
    
         
            -
            require "source/students_list.rb"
         
     | 
| 
       3 
     | 
    
         
            -
            require "source/attr_limited_regex_accessor.rb"
         
     | 
| 
       4 
     | 
    
         
            -
            require "source/students_list_adapter.rb"
         
     | 
| 
       5 
     | 
    
         
            -
            require "source/database/students_list_db.rb"
         
     | 
| 
       6 
     | 
    
         
            -
            require "source/student/student.rb"
         
     | 
| 
       7 
     | 
    
         
            -
            require "source/data_list.rb"
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            module McDelta
         
     | 
| 
       10 
     | 
    
         
            -
                class StudentsTests < Test::Unit::TestCase
         
     | 
| 
       11 
     | 
    
         
            -
                    def test_add
         
     | 
| 
       12 
     | 
    
         
            -
                        @students = StudentsList.new(
         
     | 
| 
       13 
     | 
    
         
            -
                            StudentsListDBAdapter.new(
         
     | 
| 
       14 
     | 
    
         
            -
                                StudentsListDB
         
     | 
| 
       15 
     | 
    
         
            -
                            )
         
     | 
| 
       16 
     | 
    
         
            -
                        )
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
                        @start_count = @students.count
         
     | 
| 
       19 
     | 
    
         
            -
                        
         
     | 
| 
       20 
     | 
    
         
            -
                        @students.add_student(
         
     | 
| 
       21 
     | 
    
         
            -
                            Student.new(
         
     | 
| 
       22 
     | 
    
         
            -
                                lastname: "AAA",
         
     | 
| 
       23 
     | 
    
         
            -
                                firstname: "BBB",
         
     | 
| 
       24 
     | 
    
         
            -
                                patronymic: "CCC",
         
     | 
| 
       25 
     | 
    
         
            -
                                params: {
         
     | 
| 
       26 
     | 
    
         
            -
                                    email: "test@email.com"
         
     | 
| 
       27 
     | 
    
         
            -
                                }
         
     | 
| 
       28 
     | 
    
         
            -
                            )    
         
     | 
| 
       29 
     | 
    
         
            -
                        )
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                        assert_equal(1, @students.count - @start_count)
         
     | 
| 
       32 
     | 
    
         
            -
                    end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                    def test_delete
         
     | 
| 
       35 
     | 
    
         
            -
                        @students = StudentsList.new(
         
     | 
| 
       36 
     | 
    
         
            -
                            StudentsListDBAdapter.new(
         
     | 
| 
       37 
     | 
    
         
            -
                                StudentsListDB
         
     | 
| 
       38 
     | 
    
         
            -
                            )
         
     | 
| 
       39 
     | 
    
         
            -
                        )
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                        @students.add_student(
         
     | 
| 
       42 
     | 
    
         
            -
                            Student.new(
         
     | 
| 
       43 
     | 
    
         
            -
                                lastname: "AAA",
         
     | 
| 
       44 
     | 
    
         
            -
                                firstname: "BBB",
         
     | 
| 
       45 
     | 
    
         
            -
                                patronymic: "CCC",
         
     | 
| 
       46 
     | 
    
         
            -
                                params: {
         
     | 
| 
       47 
     | 
    
         
            -
                                    email: "test@email.com"
         
     | 
| 
       48 
     | 
    
         
            -
                                }
         
     | 
| 
       49 
     | 
    
         
            -
                            )    
         
     | 
| 
       50 
     | 
    
         
            -
                        )
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
                        @students.add_student(
         
     | 
| 
       53 
     | 
    
         
            -
                            Student.new(
         
     | 
| 
       54 
     | 
    
         
            -
                                lastname: "AAA",
         
     | 
| 
       55 
     | 
    
         
            -
                                firstname: "BBB",
         
     | 
| 
       56 
     | 
    
         
            -
                                patronymic: "CCC",
         
     | 
| 
       57 
     | 
    
         
            -
                                params: {
         
     | 
| 
       58 
     | 
    
         
            -
                                    email: "test@email.com"
         
     | 
| 
       59 
     | 
    
         
            -
                                }
         
     | 
| 
       60 
     | 
    
         
            -
                            )    
         
     | 
| 
       61 
     | 
    
         
            -
                        )
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                        @current_count = @students.count
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                        @students_list = @students.get_students(0, 10, nil)
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                        @students.remove_student(@students_list[0].id)
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
                        assert_equal(1, @current_count - @students.count)
         
     | 
| 
       70 
     | 
    
         
            -
                    end
         
     | 
| 
       71 
     | 
    
         
            -
                end
         
     | 
| 
       72 
     | 
    
         
            -
            end
         
     |