moto 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 +4 -4
 - data/lib/test/base.rb +39 -8
 - data/lib/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 57aa2be0d77b80283f984a81699cf48d04b982d3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c1493c9833a9feaa83a1ce4fb257365bb759d472
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9829b8ed8027069b1114e84126bc6467e805c82bf307d402440465636382561bdfe80d87d22de77ee9cb4285461f78287b660b190f96304d906f71b88983f976
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6cf34d8914f4016eff4382968b225ecf4dea20b033c8fe948ee42b44d27bcc9f048e343dee5a4bdabcb907313caae196a6f3cd41f845c524e44dae71f083dc8b
         
     | 
    
        data/lib/test/base.rb
    CHANGED
    
    | 
         @@ -119,17 +119,48 @@ module Moto 
     | 
|
| 
       119 
119 
     | 
    
         
             
                    raise Exceptions::TestForcedPassed.new msg
         
     | 
| 
       120 
120 
     | 
    
         
             
                  end
         
     | 
| 
       121 
121 
     | 
    
         | 
| 
       122 
     | 
    
         
            -
                  # Checks  
     | 
| 
       123 
     | 
    
         
            -
                   
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
      
 122 
     | 
    
         
            +
                  # Checks for equality of both values using operator ==
         
     | 
| 
      
 123 
     | 
    
         
            +
                  #
         
     | 
| 
      
 124 
     | 
    
         
            +
                  # @param [Object] value1
         
     | 
| 
      
 125 
     | 
    
         
            +
                  # @param [Object] value2
         
     | 
| 
      
 126 
     | 
    
         
            +
                  # @param [String] failure_message Will be logged/displayed when assertion fails.
         
     | 
| 
      
 127 
     | 
    
         
            +
                  #   Substrings '$1' and '$2' (without quotes) found in string will be replaced,
         
     | 
| 
      
 128 
     | 
    
         
            +
                  #   respectively, with value1.to_s and value2.to_s
         
     | 
| 
      
 129 
     | 
    
         
            +
                  def assert_equal(value1, value2, failure_message = "Arguments should be equal: $1 != $2")
         
     | 
| 
      
 130 
     | 
    
         
            +
                    if value1 != value2
         
     | 
| 
      
 131 
     | 
    
         
            +
                      report_failed_assertion(failure_message.gsub('$1', value1.to_s).gsub('$2', value2.to_s))
         
     | 
| 
       130 
132 
     | 
    
         
             
                    end
         
     | 
| 
       131 
133 
     | 
    
         
             
                  end
         
     | 
| 
       132 
134 
     | 
    
         | 
| 
      
 135 
     | 
    
         
            +
                  # Checks if passed value is equal to True
         
     | 
| 
      
 136 
     | 
    
         
            +
                  #
         
     | 
| 
      
 137 
     | 
    
         
            +
                  # @param [Object] value
         
     | 
| 
      
 138 
     | 
    
         
            +
                  # @param [String] failure_message Will be logged/displayed when assertion fails.
         
     | 
| 
      
 139 
     | 
    
         
            +
                  #   Substring '$1' (without quotes) found in string will be replaced with value.to_s
         
     | 
| 
      
 140 
     | 
    
         
            +
                  def assert_true(value, failure_message = "Logical condition not met, expecting true, given $1")
         
     | 
| 
      
 141 
     | 
    
         
            +
                    if !value
         
     | 
| 
      
 142 
     | 
    
         
            +
                      report_failed_assertion(failure_message.gsub('$1', value.to_s))
         
     | 
| 
      
 143 
     | 
    
         
            +
                    end
         
     | 
| 
      
 144 
     | 
    
         
            +
                  end
         
     | 
| 
      
 145 
     | 
    
         
            +
                  alias_method :assert, :assert_true
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
                  # Checks if passed value is equal to False
         
     | 
| 
      
 148 
     | 
    
         
            +
                  #
         
     | 
| 
      
 149 
     | 
    
         
            +
                  # @param [Object] value
         
     | 
| 
      
 150 
     | 
    
         
            +
                  # @param [String] failure_message Will be logged/displayed when assertion fails.
         
     | 
| 
      
 151 
     | 
    
         
            +
                  #   Substring '$1' (without quotes) found in string will be replaced with value.to_s
         
     | 
| 
      
 152 
     | 
    
         
            +
                  def assert_false(value, failure_message = "Logical condition not met, expecting false, given $1")
         
     | 
| 
      
 153 
     | 
    
         
            +
                    if value
         
     | 
| 
      
 154 
     | 
    
         
            +
                      report_failed_assertion(failure_message.gsub('$1', value.to_s))
         
     | 
| 
      
 155 
     | 
    
         
            +
                    end
         
     | 
| 
      
 156 
     | 
    
         
            +
                  end
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
                  def report_failed_assertion(failure_message)
         
     | 
| 
      
 159 
     | 
    
         
            +
                    line_number = caller.select { |l| l.match(/#{static_path}:\d*:in `run'/) }.first[/\d+/].to_i
         
     | 
| 
      
 160 
     | 
    
         
            +
                    status.log_failure("ASSERTION FAILED in line #{line_number}: #{failure_message}")
         
     | 
| 
      
 161 
     | 
    
         
            +
                    logger.error(message)
         
     | 
| 
      
 162 
     | 
    
         
            +
                  end
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
       133 
164 
     | 
    
         
             
                  # @return [Hash] Configuration for selected environment + current thread combination
         
     | 
| 
       134 
165 
     | 
    
         
             
                  def env
         
     | 
| 
       135 
166 
     | 
    
         
             
                    Moto::Lib::Config.environment_config
         
     | 
    
        data/lib/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: moto
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Bartek Wilczek
         
     | 
| 
         @@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       119 
119 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       120 
120 
     | 
    
         
             
            requirements: []
         
     | 
| 
       121 
121 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       122 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 122 
     | 
    
         
            +
            rubygems_version: 2.5.2.1
         
     | 
| 
       123 
123 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       124 
124 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       125 
125 
     | 
    
         
             
            summary: Moto - yet another testing framework
         
     |