devise-specs 0.0.2 → 0.0.3
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/.codeclimate.yml +1 -1
 - data/CHANGELOG.md +9 -0
 - data/README.md +3 -3
 - data/devise-specs.gemspec +2 -2
 - data/lib/generators/devise/specs_generator.rb +2 -2
 - data/lib/generators/devise/templates/devise.rb.tt +3 -0
 - data/lib/generators/devise/templates/resource_signs_in_spec.rb.tt +10 -2
 - data/lib/generators/devise/templates/resource_signs_out_spec.rb.tt +2 -0
 - metadata +7 -6
 - data/lib/generators/devise/templates/helpers.rb.tt +0 -13
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b32f1d2b0159f689591f3bc6af50ccfc2b6eef02
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d9e16d6f2e88fdd52f2a8c709b90668fc44721ac
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5bdf0f6d6695c7da449a272816a84404bec9a31725a9877b7c4455bca5bb876d4f2672be05381e142512184857190ccafaa31a2759ee3503736e8ac568a54c96
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: df9b8fbea7ed84c1dfd83db706c512d5f53bebf55b1c0d310d7eb3d483a1026b20fb3a8f7716b26614f4e4b080844dc46f3f454b466e8fde0f4bd2c700aae404
         
     | 
    
        data/.codeclimate.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    ADDED
    
    | 
         @@ -0,0 +1,9 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ### 0.0.3
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            * Use the new `Devise::Test::IntegrationHelpers` instead of the custom `sign_in` helper
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ### 0.0.2
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            * Add more thorough expectations to generated specs
         
     | 
| 
      
 8 
     | 
    
         
            +
            * Rename specs:devise generator to devise:specs
         
     | 
| 
      
 9 
     | 
    
         
            +
            * Update README with Output and Testing sections
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -79,7 +79,7 @@ $ rails generate devise User 
     | 
|
| 
       79 
79 
     | 
    
         
             
                    gsub    spec/rails_helper.rb
         
     | 
| 
       80 
80 
     | 
    
         
             
                  insert    spec/factories/users.rb
         
     | 
| 
       81 
81 
     | 
    
         
             
                  create    spec/support/factory_girl.rb
         
     | 
| 
       82 
     | 
    
         
            -
                  create    spec/support/ 
     | 
| 
      
 82 
     | 
    
         
            +
                  create    spec/support/devise.rb
         
     | 
| 
       83 
83 
     | 
    
         
             
                  create    spec/features/user_signs_up_spec.rb
         
     | 
| 
       84 
84 
     | 
    
         
             
                  create    spec/features/user_signs_in_spec.rb
         
     | 
| 
       85 
85 
     | 
    
         
             
                  create    spec/features/user_signs_out_spec.rb
         
     | 
| 
         @@ -127,9 +127,9 @@ Adds `email` and `password` attributes to the factory. 
     | 
|
| 
       127 
127 
     | 
    
         | 
| 
       128 
128 
     | 
    
         
             
            Includes `FactoryGirl::Syntax::Methods` into RSpec config to avoid prefacing Factory Girl methods with `FactoryGirl`.
         
     | 
| 
       129 
129 
     | 
    
         | 
| 
       130 
     | 
    
         
            -
            `create    spec/support/ 
     | 
| 
      
 130 
     | 
    
         
            +
            `create    spec/support/devise.rb`
         
     | 
| 
       131 
131 
     | 
    
         | 
| 
       132 
     | 
    
         
            -
            Includes  
     | 
| 
      
 132 
     | 
    
         
            +
            Includes Devise integration test helpers into feature specs.
         
     | 
| 
       133 
133 
     | 
    
         | 
| 
       134 
134 
     | 
    
         
             
            `create    spec/features/*_spec.rb`
         
     | 
| 
       135 
135 
     | 
    
         | 
    
        data/devise-specs.gemspec
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       2 
2 
     | 
    
         
             
              s.name     = 'devise-specs'
         
     | 
| 
       3 
     | 
    
         
            -
              s.version  = '0.0. 
     | 
| 
      
 3 
     | 
    
         
            +
              s.version  = '0.0.3'
         
     | 
| 
       4 
4 
     | 
    
         
             
              s.authors  = ['Andrii Ponomarov']
         
     | 
| 
       5 
5 
     | 
    
         
             
              s.email    = 'andrii.ponomarov@gmail.com'
         
     | 
| 
       6 
6 
     | 
    
         
             
              s.summary  = 'Generates the Devise acceptance tests.'
         
     | 
| 
         @@ -10,7 +10,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              s.required_ruby_version = '>= 2.1.0'
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
              s.add_runtime_dependency 'devise', '~> 4. 
     | 
| 
      
 13 
     | 
    
         
            +
              s.add_runtime_dependency 'devise', '~> 4.2'
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
              s.add_development_dependency 'rake', '~> 11.1'
         
     | 
| 
       16 
16 
     | 
    
         
             
              s.add_development_dependency 'aruba', '~> 0.14.1'
         
     | 
| 
         @@ -8,7 +8,11 @@ feature '<%= human_name %> signs in' do 
     | 
|
| 
       8 
8 
     | 
    
         
             
                <%= singular_name %> = Fabricate :<%= singular_name %>
         
     | 
| 
       9 
9 
     | 
    
         
             
            <% end -%>
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 11 
     | 
    
         
            +
                visit new_<%= singular_name %>_session_path
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                fill_in 'Email', with: <%= singular_name %>.email
         
     | 
| 
      
 14 
     | 
    
         
            +
                fill_in 'Password', with: <%= singular_name %>.password
         
     | 
| 
      
 15 
     | 
    
         
            +
                click_button 'Log in'
         
     | 
| 
       12 
16 
     | 
    
         | 
| 
       13 
17 
     | 
    
         
             
                expect(page).to have_text 'Signed in successfully.'
         
     | 
| 
       14 
18 
     | 
    
         
             
                expect(page).to have_link 'Sign Out'
         
     | 
| 
         @@ -22,7 +26,11 @@ feature '<%= human_name %> signs in' do 
     | 
|
| 
       22 
26 
     | 
    
         
             
                <%= singular_name %> = Fabricate.build :<%= singular_name %>
         
     | 
| 
       23 
27 
     | 
    
         
             
            <% end -%>
         
     | 
| 
       24 
28 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
                 
     | 
| 
      
 29 
     | 
    
         
            +
                visit new_<%= singular_name %>_session_path
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                fill_in 'Email', with: <%= singular_name %>.email
         
     | 
| 
      
 32 
     | 
    
         
            +
                fill_in 'Password', with: <%= singular_name %>.password
         
     | 
| 
      
 33 
     | 
    
         
            +
                click_button 'Log in'
         
     | 
| 
       26 
34 
     | 
    
         | 
| 
       27 
35 
     | 
    
         
             
                expect(page).to have_text 'Invalid Email or password.'
         
     | 
| 
       28 
36 
     | 
    
         
             
                expect(page).to have_no_link 'Sign Out'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: devise-specs
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Andrii Ponomarov
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-07-06 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: devise
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: '4. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '4.2'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: '4. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '4.2'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: rake
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -61,6 +61,7 @@ files: 
     | 
|
| 
       61 
61 
     | 
    
         
             
            - ".codeclimate.yml"
         
     | 
| 
       62 
62 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       63 
63 
     | 
    
         
             
            - ".travis.yml"
         
     | 
| 
      
 64 
     | 
    
         
            +
            - CHANGELOG.md
         
     | 
| 
       64 
65 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       65 
66 
     | 
    
         
             
            - README.md
         
     | 
| 
       66 
67 
     | 
    
         
             
            - Rakefile
         
     | 
| 
         @@ -68,8 +69,8 @@ files: 
     | 
|
| 
       68 
69 
     | 
    
         
             
            - lib/devise-specs.rb
         
     | 
| 
       69 
70 
     | 
    
         
             
            - lib/devise/specs/railtie.rb
         
     | 
| 
       70 
71 
     | 
    
         
             
            - lib/generators/devise/specs_generator.rb
         
     | 
| 
      
 72 
     | 
    
         
            +
            - lib/generators/devise/templates/devise.rb.tt
         
     | 
| 
       71 
73 
     | 
    
         
             
            - lib/generators/devise/templates/factory_girl.rb.tt
         
     | 
| 
       72 
     | 
    
         
            -
            - lib/generators/devise/templates/helpers.rb.tt
         
     | 
| 
       73 
74 
     | 
    
         
             
            - lib/generators/devise/templates/resource_resets_password_spec.rb.tt
         
     | 
| 
       74 
75 
     | 
    
         
             
            - lib/generators/devise/templates/resource_signs_in_spec.rb.tt
         
     | 
| 
       75 
76 
     | 
    
         
             
            - lib/generators/devise/templates/resource_signs_out_spec.rb.tt
         
     | 
| 
         @@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       94 
95 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       95 
96 
     | 
    
         
             
            requirements: []
         
     | 
| 
       96 
97 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       97 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 98 
     | 
    
         
            +
            rubygems_version: 2.5.1
         
     | 
| 
       98 
99 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       99 
100 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       100 
101 
     | 
    
         
             
            summary: Generates the Devise acceptance tests.
         
     | 
| 
         @@ -1,13 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Helpers
         
     | 
| 
       2 
     | 
    
         
            -
              def sign_in(resource)
         
     | 
| 
       3 
     | 
    
         
            -
                visit new_<%= singular_name %>_session_path
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
                fill_in 'Email', with: resource.email
         
     | 
| 
       6 
     | 
    
         
            -
                fill_in 'Password', with: resource.password
         
     | 
| 
       7 
     | 
    
         
            -
                click_button 'Log in'
         
     | 
| 
       8 
     | 
    
         
            -
              end
         
     | 
| 
       9 
     | 
    
         
            -
            end
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            RSpec.configure do |config|
         
     | 
| 
       12 
     | 
    
         
            -
              config.include Helpers, type: :feature
         
     | 
| 
       13 
     | 
    
         
            -
            end
         
     |