rspeckled 0.0.3 → 0.0.4

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: 98403eadd91a6ec563587a4949c4632573c29e3f
4
- data.tar.gz: 7ec2e31f96d027e8760f4294185c9583036d496e
3
+ metadata.gz: d7577e96b392051718ad64058a4f9cf5b71fd773
4
+ data.tar.gz: b642ee57a5a4d73d64646f56c7b0697e10fb7408
5
5
  SHA512:
6
- metadata.gz: 4b19ececf090c791f094ac62744dfe1327aaa2d39c5e993496167c81ee2b70fb4e3b3c7875d61a636683335aaf22fc5adceb3c6d97e4011dd7f23f389574d407
7
- data.tar.gz: 4887881a25f933d78aabcd88262fb901e7769b1fb69358e9b5c129ddad5dc7469835c8cfd431cf38b9dd17afa2dd49c3c492ac177034f6400129075ec3459b8f
6
+ metadata.gz: 36fb1b28483ececb3e85200ab9ae50c76fd26bacb15a33b901e40c454c5e10398dc7166d15bfcf0085734b6723526926498babbc5701ab584d38e6600b33910f
7
+ data.tar.gz: a25bac8c8f33e4567100fe0945dca9261412452b1b590cb1d4731d5586cd0e19e0654336bf606be4995b9bc96c351386e42ed5f833122149cc816f6a1d31637a
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
  def uuid_regex
3
2
  /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/
4
3
  end
@@ -1,6 +1,3 @@
1
- # frozen_string_literal: true
2
- require 'json'
3
-
4
1
  def json_response
5
2
  JSON.load(response.body)
6
3
  end
@@ -0,0 +1,13 @@
1
+ ##############################################################################
2
+ # Bundler
3
+ ##############################################################################
4
+ #
5
+ # Stolen from http://myronmars.to/n/dev-blog/2012/03/faster-test-boot-times-with-bundler-standalone
6
+ #
7
+ begin
8
+ require File.join(Dir.pwd, 'bundle', 'bundler', 'setup.rb')
9
+ rescue LoadError
10
+ require 'bundler'
11
+
12
+ Bundler.setup
13
+ end
@@ -0,0 +1,48 @@
1
+ ##############################################################################
2
+ # Capybara Plugin
3
+ ##############################################################################
4
+ #
5
+ # This plugin does not attempt to require capybara. It assumes that if you're
6
+ # using capybara, you're probably using something like Bundler which has already
7
+ # required it for you.
8
+ #
9
+ # If this is not the case, you will need to require it prior to requiring
10
+ # rspeckled.
11
+ #
12
+ # The same goes for capybara-webkit. It must be required before rspeckled.
13
+ #
14
+ begin
15
+ require 'capybara/rspec'
16
+ require 'capybara/rails'
17
+
18
+ if defined?(Capybara::Driver::Base)
19
+ Capybara.register_driver :chrome do |app|
20
+ Capybara::Selenium::Driver.new(app, :browser => :chrome)
21
+ end
22
+
23
+ Capybara.javascript_driver = if defined?(Capybara::Webkit)
24
+ :webkit
25
+ else
26
+ :selenium
27
+ end
28
+
29
+ RSpec.configure do |config|
30
+ config.before(:each, :js => true) do
31
+ page.driver.reset!
32
+ end
33
+ end
34
+
35
+ Capybara.configure do |config|
36
+ config.match = :prefer_exact
37
+ config.ignore_hidden_elements = true
38
+ config.visible_text_only = true
39
+ end
40
+
41
+ if defined?(Chamber)
42
+ Capybara.default_host = Chamber.env.http.host_with_port
43
+ Capybara.app_host = Chamber.env.http.base_url
44
+ Capybara.server_port = Chamber.env.http.port
45
+ end
46
+ end
47
+ rescue LoadError
48
+ end
@@ -3,11 +3,13 @@ require 'rspeckled/plugins/authentication'
3
3
  require 'rspeckled/plugins/awesome_print'
4
4
  require 'rspeckled/plugins/bullet'
5
5
  require 'rspeckled/plugins/carrier_wave'
6
+ require 'rspeckled/plugins/capybara'
6
7
  require 'rspeckled/plugins/database_cleaner'
7
8
  require 'rspeckled/plugins/devise'
8
9
  require 'rspeckled/plugins/elasticsearch'
9
10
  require 'rspeckled/plugins/email'
10
11
  require 'rspeckled/plugins/factory_girl'
12
+ require 'rspeckled/plugins/garbage_collection'
11
13
  require 'rspeckled/plugins/fakeredis'
12
14
  require 'rspeckled/plugins/features'
13
15
  require 'rspeckled/plugins/omniauth'
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.join('..', 'active_record_connection_setup'), __FILE__)
2
- require 'rspeckled'
2
+
3
+ require 'rspeckled/spec_helpers/rspeckled'
3
4
 
4
5
  Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].sort.each { |f| require f }
@@ -0,0 +1,8 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+
3
+ require File.expand_path('../../config/environment', __FILE__)
4
+ require 'rspec/rails'
5
+
6
+ require 'rspeckled/spec_helpers/rspeckled'
7
+
8
+ Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].sort.each { |f| require f }
@@ -11,6 +11,6 @@ Pathname.glob("#{Dir.pwd}/app/*").each do |directory|
11
11
  end
12
12
  end
13
13
 
14
- require 'rspeckled'
14
+ require 'rspeckled/spec_helpers/rspeckled'
15
15
 
16
16
  Dir[File.join(Dir.pwd, 'spec', 'support', '**', '*.rb')].sort.each { |f| require f }
@@ -0,0 +1,8 @@
1
+ # These Plugins Must Be Loaded Before Anything Else
2
+ require 'rspeckled/plugins/bundler'
3
+ require 'rspeckled/plugins/code_climate'
4
+ require 'rspeckled/plugins/simple_cov'
5
+
6
+ require 'rspeckled/support'
7
+ require 'rspeckled/helpers'
8
+ require 'rspeckled/plugins'
@@ -1 +1,86 @@
1
- Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
1
+ ###
2
+ # If DATABASE_URL is set, it means we're in production and running the tests
3
+ # would be very bad news.
4
+ #
5
+ abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']
6
+
7
+ RSpec.configure do |config|
8
+ ##############################################################################
9
+ # RAILS
10
+ ##############################################################################
11
+
12
+ if defined? RSpec::Rails
13
+ require 'rspeckled/plugins/rails/engine'
14
+
15
+ config.infer_base_class_for_anonymous_controllers = true
16
+
17
+ config.infer_spec_type_from_file_location! if config.respond_to?(:infer_spec_type_from_file_location!)
18
+
19
+ if Pathname.pwd.join('spec', 'dummy', 'config', 'environment.rb').exist?
20
+ config.include Rspeckled::NamespacedEngineControllerRouteFix, :type => :controller
21
+ end
22
+ end
23
+
24
+ ##############################################################################
25
+ # MOCKING
26
+ ##############################################################################
27
+
28
+ config.mock_with :rspec do |mocks|
29
+ mocks.verify_partial_doubles = true
30
+ mocks.verify_doubled_constant_names = true
31
+ mocks.syntax = :expect
32
+ end
33
+
34
+ ##############################################################################
35
+ # INTERNATIONALIZATION
36
+ ##############################################################################
37
+
38
+ if defined? AbstractController::Translation
39
+ config.include AbstractController::Translation
40
+ end
41
+
42
+ ##############################################################################
43
+ # FORMATTING
44
+ ##############################################################################
45
+
46
+ config.color = true
47
+
48
+ config.add_formatter 'Fuubar'
49
+ config.add_formatter 'documentation', 'tmp/rspec.txt'
50
+
51
+ ##############################################################################
52
+ # FILTERING AND RUN ORDER
53
+ ##############################################################################
54
+
55
+ # Pending Specs
56
+ config.alias_example_to :pit, :pending => true
57
+
58
+ # Focused Specs
59
+ config.filter_run :focused => true
60
+ config.alias_example_to :fit, :focused => true
61
+
62
+ # Focus and Force Selenium
63
+ config.alias_example_to :sit, :focused => true,
64
+ :js => true,
65
+ :driver => :selenium
66
+
67
+ config.order = 'random'
68
+ config.run_all_when_everything_filtered = true
69
+
70
+ ##############################################################################
71
+ # PERSISTENT FAILURES
72
+ ##############################################################################
73
+
74
+ if config.respond_to?(:example_status_persistence_file_path=)
75
+ config.example_status_persistence_file_path = 'tmp/rspec_examples.txt'
76
+ end
77
+
78
+ ##############################################################################
79
+ # EXPECTATIONS
80
+ ##############################################################################
81
+
82
+ config.expect_with :rspec do |c|
83
+ c.syntax = :expect
84
+ c.include_chain_clauses_in_custom_matcher_descriptions = true
85
+ end
86
+ end
@@ -1,3 +1,3 @@
1
1
  module Rspeckled
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
data/lib/rspeckled.rb CHANGED
@@ -1,8 +0,0 @@
1
- # These Plugins Must Be Loaded Before Anything Else
2
- require 'rspeckled/plugins/code_climate'
3
- require 'rspeckled/plugins/simple_cov'
4
-
5
- require 'rspeckled/support'
6
- require 'rspeckled/helpers'
7
- require 'rspeckled/plugins'
8
- # require 'rspeckled/matchers'
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspeckled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
@@ -31,7 +31,7 @@ cert_chain:
31
31
  zRIv8lqQM8QFT76rzP5SBCERwN+ltKAFbQ5/FwmZNGWYnmCP3RZMQiRnbh+9H9lh
32
32
  mlbwaYZTjgsXq6cy8N38EecewgBbZYS1IYJraE/M
33
33
  -----END CERTIFICATE-----
34
- date: 2016-05-11 00:00:00.000000000 Z
34
+ date: 2016-05-13 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
@@ -99,6 +99,8 @@ files:
99
99
  - lib/rspeckled/plugins/authentication.rb
100
100
  - lib/rspeckled/plugins/awesome_print.rb
101
101
  - lib/rspeckled/plugins/bullet.rb
102
+ - lib/rspeckled/plugins/bundler.rb
103
+ - lib/rspeckled/plugins/capybara.rb
102
104
  - lib/rspeckled/plugins/carrier_wave.rb
103
105
  - lib/rspeckled/plugins/code_climate.rb
104
106
  - lib/rspeckled/plugins/database_cleaner.rb
@@ -108,6 +110,7 @@ files:
108
110
  - lib/rspeckled/plugins/factory_girl.rb
109
111
  - lib/rspeckled/plugins/fakeredis.rb
110
112
  - lib/rspeckled/plugins/features.rb
113
+ - lib/rspeckled/plugins/garbage_collection.rb
111
114
  - lib/rspeckled/plugins/mocks.rb
112
115
  - lib/rspeckled/plugins/omniauth.rb
113
116
  - lib/rspeckled/plugins/rails/engine.rb
@@ -126,21 +129,10 @@ files:
126
129
  - lib/rspeckled/plugins/wisper.rb
127
130
  - lib/rspeckled/spec_helpers/active_record_basic.rb
128
131
  - lib/rspeckled/spec_helpers/active_record_connection_setup.rb
132
+ - lib/rspeckled/spec_helpers/rails.rb
129
133
  - lib/rspeckled/spec_helpers/rails_engine.rb
134
+ - lib/rspeckled/spec_helpers/rspeckled.rb
130
135
  - lib/rspeckled/support.rb
131
- - lib/rspeckled/support/expectations.rb
132
- - lib/rspeckled/support/failures.rb
133
- - lib/rspeckled/support/focused.rb
134
- - lib/rspeckled/support/formatters.rb
135
- - lib/rspeckled/support/garbage_collection.rb
136
- - lib/rspeckled/support/heroku.rb
137
- - lib/rspeckled/support/i18n.rb
138
- - lib/rspeckled/support/mocks.rb
139
- - lib/rspeckled/support/output.rb
140
- - lib/rspeckled/support/pending.rb
141
- - lib/rspeckled/support/rails.rb
142
- - lib/rspeckled/support/random.rb
143
- - lib/rspeckled/support/selenium.rb
144
136
  - lib/rspeckled/vcr_matchers/uri_without_trailing_id.rb
145
137
  - lib/rspeckled/version.rb
146
138
  homepage:
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ���W��F������mW�/�Ң�
2
- �������N$@�o3E��1�Tu ��P�#�/�Dq&��{�T���fT eK�B�ژM���&!�A��ee҂�-�Y]3��1 #ێ�e�х��
3
- ��}������F#O���d<4mA�B�ܧ:���y�&�a�h4��� \ɝ��bֶEn˓�(��ly��g�|�5`C����!�.?Y<F�w�tA��)8��?{ 18-�]�Cr��%��n�sί$�d�1#
1
+ >�?\5� O��� �u�2*؈���Dܧ�Z���l��sA՝������e�%+({μ�J���@V]�:R�EO��N'�s׉��3Y%��:�@vA�r��ɯ��#���8�0���w� ��Y�Xc�#���� �r-!bAB36_tz����A�E��3�vi&T#V��d�!
2
+ 䍁,�[)��>�v@��
@@ -1,6 +0,0 @@
1
- RSpec.configure do |config|
2
- config.expect_with :rspec do |c|
3
- c.syntax = :expect
4
- c.include_chain_clauses_in_custom_matcher_descriptions = true
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- RSpec.configure do |config|
2
- if config.respond_to?(:example_status_persistence_file_path=)
3
- config.example_status_persistence_file_path = 'tmp/rspec_examples.txt'
4
- end
5
- end
@@ -1,6 +0,0 @@
1
- RSpec.configure do |config|
2
- config.filter_run :focused => true
3
- config.alias_example_to :fit, :focused => true
4
-
5
- config.run_all_when_everything_filtered = true
6
- end
@@ -1,6 +0,0 @@
1
- RSpec.configure do |config|
2
- config.color = true
3
-
4
- config.add_formatter 'Fuubar'
5
- config.add_formatter 'documentation', 'tmp/rspec.txt'
6
- end
@@ -1 +0,0 @@
1
- abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']
@@ -1,5 +0,0 @@
1
- RSpec.configure do |config|
2
- if defined? AbstractController::Translation
3
- config.include AbstractController::Translation
4
- end
5
- end
@@ -1,7 +0,0 @@
1
- RSpec.configure do |config|
2
- config.mock_with :rspec do |mocks|
3
- mocks.verify_partial_doubles = true
4
- mocks.verify_doubled_constant_names = true
5
- mocks.syntax = :expect
6
- end
7
- end
@@ -1 +0,0 @@
1
- require 'pp'
@@ -1,3 +0,0 @@
1
- RSpec.configure do |config|
2
- config.alias_example_to :pit, :pending => true
3
- end
@@ -1,13 +0,0 @@
1
- require 'rspeckled/plugins/rails/engine'
2
-
3
- if defined? RSpec::Rails
4
- RSpec.configure do |config|
5
- config.infer_base_class_for_anonymous_controllers = true
6
-
7
- config.infer_spec_type_from_file_location! if config.respond_to?(:infer_spec_type_from_file_location!)
8
-
9
- if Pathname.pwd.join('spec', 'dummy', 'config', 'environment.rb').exist?
10
- config.include Rspeckled::NamespacedEngineControllerRouteFix, :type => :controller
11
- end
12
- end
13
- end
@@ -1,3 +0,0 @@
1
- RSpec.configure do |config|
2
- config.order = 'random'
3
- end
@@ -1,4 +0,0 @@
1
- # For when you just have to know what the hell the browser is doing
2
- RSpec.configure do |config|
3
- config.alias_example_to :sit, :focused => true, :js => true, :driver => :selenium
4
- end