devise-specs 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21cf31ec9a840c58f26333f12a6fc1026b8143f5
4
- data.tar.gz: dbc3396646f4aa5d55f159c184e11700495c3bb7
3
+ metadata.gz: b32f1d2b0159f689591f3bc6af50ccfc2b6eef02
4
+ data.tar.gz: d9e16d6f2e88fdd52f2a8c709b90668fc44721ac
5
5
  SHA512:
6
- metadata.gz: b656287c6c23bf290a4e6916e086e25d10dc6d0abc2a833b13b21f91847f38c6cc1e2c6bfa3b1629725f1e53da69b2a8159f4c97c026295b5d303532ed0cec28
7
- data.tar.gz: 834c4498b8b81a65d8413f521b20aee413626f1ffaec4c08bdffc60c7369fac940bf0975ed0903f5cd11e300aa7dae72e014ffce42758435d8a23f386b2e05b7
6
+ metadata.gz: 5bdf0f6d6695c7da449a272816a84404bec9a31725a9877b7c4455bca5bb876d4f2672be05381e142512184857190ccafaa31a2759ee3503736e8ac568a54c96
7
+ data.tar.gz: df9b8fbea7ed84c1dfd83db706c512d5f53bebf55b1c0d310d7eb3d483a1026b20fb3a8f7716b26614f4e4b080844dc46f3f454b466e8fde0f4bd2c700aae404
data/.codeclimate.yml CHANGED
@@ -6,7 +6,7 @@ engines:
6
6
  languages:
7
7
  - ruby
8
8
  exclude_fingerprints:
9
- - 9f7a179915ee4a7f1d639e9242aedd01
9
+ - 3b39f38c33cdc3b6dc57a5d8160f707b
10
10
  fixme:
11
11
  enabled: true
12
12
  rubocop:
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/helpers.rb
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/helpers.rb`
130
+ `create spec/support/devise.rb`
131
131
 
132
- Includes `sign_in(resource)` helper into feature specs.
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.2'
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.1'
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'
@@ -27,8 +27,8 @@ module Devise
27
27
  end
28
28
  end
29
29
 
30
- def create_helpers_file
31
- template 'helpers.rb', 'spec/support/helpers.rb'
30
+ def create_devise_config_file
31
+ template 'devise.rb', 'spec/support/devise.rb'
32
32
  end
33
33
 
34
34
  def create_specs
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include Devise::Test::IntegrationHelpers, type: :feature
3
+ end
@@ -8,7 +8,11 @@ feature '<%= human_name %> signs in' do
8
8
  <%= singular_name %> = Fabricate :<%= singular_name %>
9
9
  <% end -%>
10
10
 
11
- sign_in <%= singular_name %>
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
- sign_in <%= singular_name %>
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'
@@ -10,6 +10,8 @@ feature '<%= human_name %> signs out' do
10
10
 
11
11
  sign_in <%= singular_name %>
12
12
 
13
+ visit root_path
14
+
13
15
  click_link 'Sign Out'
14
16
 
15
17
  expect(page).to have_text 'Signed out successfully.'
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.2
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-05-30 00:00:00.000000000 Z
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.1'
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.1'
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.6.3
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