kitestrings 1.0.13 → 1.0.14

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: 523e7b969f36e69d1303bbd3c9dbc980ebb13abf
4
- data.tar.gz: 5a146a2ac64fbb126ac5acda88eea1e12580a4ca
3
+ metadata.gz: df7ed23de080fadb279e04672d4317c86160169f
4
+ data.tar.gz: 7aa6417285a8bd8c7cc8a53d2fcc8fed4df92386
5
5
  SHA512:
6
- metadata.gz: fb2bb18ccc67d3956e1f103c078b62da49c747679850e126c58f0469539a841ce73b503b9c91813171768b6fabf07a7de552b4eb2aff5470dee60f311a81ce31
7
- data.tar.gz: 5bc309addb5132695ca6a0130239b4753cc8814e2897cc19cd6d1617f2ed4aee1ed194622dd66f4f9c7333f66af2a39d18acc33d1cfdcc5b523fe8c80f4b67a9
6
+ metadata.gz: 35aa28fcde35344c176d9508a513a41cd00017b34e3d188b3779e25c505a4a581f24eb8c1c54e53accc5800530af321fe31e1279390f9a5a403dbffa721f7d37
7
+ data.tar.gz: 0dff13d849b4a8fe8639d76389f9ef082d827f8ea9aba9912a22ca8e26f57d8043d5cfdb2177a3404bce9af53c627a91ed88f739d9958ca8d16a3f339ebf5664
@@ -27,17 +27,13 @@ module Kitestrings
27
27
  end
28
28
 
29
29
  def copy_spec_files
30
- directory "spec", "lib/templates/spec"
30
+ copy_file "spec/rails_helper.rb", "spec/rails_helper.rb"
31
31
  end
32
32
 
33
33
  def copy_spec_support_files
34
34
  directory "support", "spec/support"
35
35
  end
36
36
 
37
- def copy_spec_ext
38
- directory "spec_ext", "spec_ext"
39
- end
40
-
41
37
  def copy_app_view_files
42
38
  copy_file "views/application/_navigation.html.haml", "app/views/application/_navigation.html.haml"
43
39
  copy_file "views/layouts/application.html.haml", "app/views/layouts/application.html.haml"
@@ -60,10 +56,6 @@ module Kitestrings
60
56
  end
61
57
  end
62
58
 
63
- def setup_directories
64
- empty_directory("lib/capistrano")
65
- create_file("lib/capistrano/.keep")
66
- end
67
59
  end
68
60
  end
69
61
  end
@@ -1,5 +1,6 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
2
  ENV["RAILS_ENV"] ||= 'test'
3
+ require 'spec_helper'
3
4
  require File.expand_path("../../config/environment", __FILE__)
4
5
  require 'rspec/rails'
5
6
  require 'rspec/autorun'
@@ -8,12 +9,10 @@ require 'rspec/autorun'
8
9
  # in spec/support/ and its subdirectories.
9
10
  Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10
11
 
11
- <% if ::Rails::VERSION::STRING >= '4' -%>
12
12
  # Checks for pending migrations before tests are run.
13
13
  # If you are not using ActiveRecord, you can remove this line.
14
14
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
15
15
 
16
- <% end -%>
17
16
  RSpec.configure do |config|
18
17
  # clear the test log file before we start.
19
18
  log_file = Rails.root.join("log/test.log")
@@ -50,28 +49,19 @@ RSpec.configure do |config|
50
49
  # --seed 1234
51
50
  config.order = "random"
52
51
 
53
- config.before(:suite) do
54
- DatabaseCleaner.clean_with(:truncation)
55
- end
56
52
 
57
- config.before(:each) do
58
-
59
- DatabaseCleaner.strategy = :transaction
60
- end
61
-
62
- config.before(:each, :js => true) do
63
- DatabaseCleaner.strategy = :truncation
64
- end
65
-
66
- config.before(:each) do
67
- DatabaseCleaner.start
68
- end
69
-
70
- config.after(:each) do
71
- DatabaseCleaner.clean
72
- end
73
-
74
- config.after(:all) do
75
- Fracture.clear
76
- end
53
+ # RSpec Rails can automatically mix in different behaviours to your tests
54
+ # based on their file location, for example enabling you to call `get` and
55
+ # `post` in specs under `spec/controllers`.
56
+ #
57
+ # You can disable this behaviour by removing the line below, and instead
58
+ # explicitly tag your specs with their type, e.g.:
59
+ #
60
+ # RSpec.describe UsersController, :type => :controller do
61
+ # # ...
62
+ # end
63
+ #
64
+ # The different available types are documented in the features, such as in
65
+ # https://relishapp.com/rspec/rspec-rails/docs
66
+ config.infer_spec_type_from_file_location!
77
67
  end
@@ -0,0 +1,21 @@
1
+ RSpec.configure do |config|
2
+ config.before(:suite) do
3
+ DatabaseCleaner.clean_with(:truncation)
4
+ end
5
+
6
+ config.before(:each) do
7
+ DatabaseCleaner.strategy = :transaction
8
+ end
9
+
10
+ config.before(:each, :js => true) do
11
+ DatabaseCleaner.strategy = :truncation
12
+ end
13
+
14
+ config.before(:each) do
15
+ DatabaseCleaner.start
16
+ end
17
+
18
+ config.after(:each) do
19
+ DatabaseCleaner.clean
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ RSpec.configure do |config|
2
+ config.after(:all) do
3
+ Fracture.clear
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Kitestrings
2
- VERSION = "1.0.13"
2
+ VERSION = "1.0.14"
3
3
  end
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'active_support'
3
3
  require 'active_model'
4
4
  require 'array_validator'
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'async'
3
3
 
4
4
  module ActiveRecord
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'fileutils'
3
3
  require 'generator_spec'
4
4
  require 'generators/kitestrings/install_generator'
@@ -17,8 +17,6 @@ describe Kitestrings::Generators::InstallGenerator do
17
17
 
18
18
  context "check files" do
19
19
  %w[
20
- spec_ext/my_ip_spec.rb
21
- spec_ext/rails_helper_ext.rb
22
20
  spec/rails_helper.rb
23
21
  config/deploy.rb
24
22
  config/deploy/integ.rb
@@ -40,7 +38,6 @@ describe Kitestrings::Generators::InstallGenerator do
40
38
  app/views/public/403.html
41
39
  app/views/layouts/application.html.haml
42
40
  app/views/application/_navigation.html.haml
43
- lib/capistrano/.keep
44
41
  ].each do |file|
45
42
  it "created #{file}" do
46
43
  path = file_path(file)
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'fileutils'
3
3
  require 'generator_spec'
4
4
  require 'generators/kitestrings/messages_generator'
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'kitestrings/menu'
3
3
  require 'kitestrings/menu/model'
4
4
 
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'page_and_sort_helper'
3
3
 
4
4
  describe PageAndSortHelper do
@@ -1,4 +1,4 @@
1
- require 'rails_helper'
1
+ require 'spec_helper'
2
2
  require 'active_support'
3
3
  require 'active_model'
4
4
  require 'size_validator'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitestrings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - ridget
@@ -143,9 +143,9 @@ files:
143
143
  - lib/generators/templates/rspec/model/model_spec.rb
144
144
  - lib/generators/templates/rspec/scaffold/controller_spec.rb
145
145
  - lib/generators/templates/rspec/scaffold/routing_spec.rb
146
- - lib/generators/templates/spec/rails_helper.rb.tt
147
- - lib/generators/templates/spec_ext/my_ip_spec.rb
148
- - lib/generators/templates/spec_ext/spec_helper_ext.rb
146
+ - lib/generators/templates/spec/rails_helper.rb
147
+ - lib/generators/templates/support/database_cleaner.rb
148
+ - lib/generators/templates/support/fracture.rb
149
149
  - lib/generators/templates/support/render_views.rb
150
150
  - lib/generators/templates/views/application/_navigation.html.haml
151
151
  - lib/generators/templates/views/layouts/application.html.haml
@@ -1,7 +0,0 @@
1
- require_relative 'rails_helper_ext'
2
-
3
- describe "My IP" do
4
- it "has an I Paddress" do
5
- expect(Net::HTTP.get("bot.whatismyipaddress.com", '/')).to match(/\d*\.\d*\.\d*\.\d*/)
6
- end
7
- end
@@ -1,37 +0,0 @@
1
- require 'rspec'
2
-
3
- ENV["RAILS_ENV"] ||= 'test'
4
- require File.expand_path("../../config/environment", __FILE__)
5
- require 'rspec/rails'
6
-
7
- # ensure that we have a network connection to the internet before running any of these tests.
8
- begin
9
- require 'net/http'
10
- Net::HTTP.get("google.com", '/')
11
- rescue Interrupt
12
- exit 0
13
- rescue StandardError
14
- puts "Network offline!"
15
- exit 1
16
- end
17
-
18
- # load support files:
19
- Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
20
-
21
- RSpec.configure do |config|
22
- # Run specs in random order to surface order dependencies. If you find an
23
- # order dependency and want to debug it, you can fix the order by providing
24
- # the seed, which is printed after each run.
25
- # --seed 1234
26
- config.order = "random"
27
-
28
- config.use_transactional_fixtures = false
29
-
30
- # include any other modules
31
-
32
- # add global before/after blocks:
33
-
34
- end
35
-
36
- # turn of deprecation warning.
37
- I18n.enforce_available_locales = false