effective_test_bot 1.2.4 → 1.2.5
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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: fd91036d4b959a1a59934248064b1c42b6bb6e9cf8558b6809b9621fc67aed76
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e5bba54a9961847859d1e02963442d4065e75308336a97609eeb351ac9ab671c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 574c821e54abc360af9b1f4f11990b8db8f06685a5c25f096621e8933e34a77829134ae9e06eb5836b171d9ba90a34289e7718566986cdd254af7097b0a1f628
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6b3f2fd19df1a688cb2fb1bcfa79a2f7c3baf0a5832fdf80796cc1c7cec842314eb99ad03a64d922ce22f8a5d56795ff8f235d27d05675aa7b7988c9e811573d
         
     | 
| 
         @@ -1,5 +1,4 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module EffectiveTestBotAssertions
         
     | 
| 
       2 
     | 
    
         
            -
              include ActiveJob::TestHelper if defined?(ActiveJob::TestHelper)
         
     | 
| 
       3 
2 
     | 
    
         | 
| 
       4 
3 
     | 
    
         
             
              def assert_page_content(content, message: "(page_content) Expected page content :content: to be present")
         
     | 
| 
       5 
4 
     | 
    
         
             
                assert page.has_text?(/#{Regexp.escape(content)}/i, wait: 0), message.sub(':content:', content)
         
     | 
| 
         @@ -236,17 +235,19 @@ module EffectiveTestBotAssertions 
     | 
|
| 
       236 
235 
     | 
    
         
             
                retval
         
     | 
| 
       237 
236 
     | 
    
         
             
              end
         
     | 
| 
       238 
237 
     | 
    
         | 
| 
      
 238 
     | 
    
         
            +
              #include ActiveJob::TestHelper if defined?(ActiveJob::TestHelper)
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
       239 
240 
     | 
    
         
             
              # assert_email :new_user_sign_up
         
     | 
| 
       240 
241 
     | 
    
         
             
              # assert_email :new_user_sign_up, to: 'newuser@example.com'
         
     | 
| 
       241 
242 
     | 
    
         
             
              # assert_email from: 'admin@example.com'
         
     | 
| 
       242 
     | 
    
         
            -
              def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil, count: nil, &block)
         
     | 
| 
      
 243 
     | 
    
         
            +
              def assert_email(action = nil, perform: nil, to: nil, from: nil, subject: nil, body: nil, message: nil, count: nil, &block)
         
     | 
| 
       243 
244 
     | 
    
         
             
                retval = nil
         
     | 
| 
       244 
245 
     | 
    
         | 
| 
       245 
     | 
    
         
            -
                perform_enqueued_jobs if respond_to?(:perform_enqueued_jobs)
         
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
246 
     | 
    
         
             
                if block_given?
         
     | 
| 
       248 
247 
     | 
    
         
             
                  before = ActionMailer::Base.deliveries.length
         
     | 
| 
      
 248 
     | 
    
         
            +
                  perform_enqueued_jobs if perform && respond_to?(:perform_enqueued_jobs)
         
     | 
| 
       249 
249 
     | 
    
         
             
                  retval = yield
         
     | 
| 
      
 250 
     | 
    
         
            +
             
     | 
| 
       250 
251 
     | 
    
         
             
                  difference = (ActionMailer::Base.deliveries.length - before)
         
     | 
| 
       251 
252 
     | 
    
         | 
| 
       252 
253 
     | 
    
         
             
                  if count.present?
         
     | 
| 
         @@ -254,6 +255,8 @@ module EffectiveTestBotAssertions 
     | 
|
| 
       254 
255 
     | 
    
         
             
                  else
         
     | 
| 
       255 
256 
     | 
    
         
             
                    assert (difference > 0), "(assert_email) Expected at least one email to have been delivered"
         
     | 
| 
       256 
257 
     | 
    
         
             
                  end
         
     | 
| 
      
 258 
     | 
    
         
            +
                else
         
     | 
| 
      
 259 
     | 
    
         
            +
                  perform_enqueued_jobs if perform && respond_to?(:perform_enqueued_jobs)
         
     | 
| 
       257 
260 
     | 
    
         
             
                end
         
     | 
| 
       258 
261 
     | 
    
         | 
| 
       259 
262 
     | 
    
         
             
                if (action || to || from || subject || body).nil?
         
     | 
| 
         @@ -110,7 +110,7 @@ module EffectiveTestBotTestHelper 
     | 
|
| 
       110 
110 
     | 
    
         
             
              end
         
     | 
| 
       111 
111 
     | 
    
         | 
| 
       112 
112 
     | 
    
         
             
              def current_user_assigns_class
         
     | 
| 
       113 
     | 
    
         
            -
                current_user_assigns_key.sub('current_').gsub('_', '::').classify.safe_constantize
         
     | 
| 
      
 113 
     | 
    
         
            +
                current_user_assigns_key.sub('current_', '').gsub('_', '::').classify.safe_constantize
         
     | 
| 
       114 
114 
     | 
    
         
             
              end
         
     | 
| 
       115 
115 
     | 
    
         | 
| 
       116 
116 
     | 
    
         
             
              def access_denied_exception
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: effective_test_bot
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.2.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Code and Effect
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-03-29 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     |