rspectacular 0.38.0 → 0.39.0

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: 1c225897d6ad7e1191390c63c25bf9fb2fbf2c5c
4
- data.tar.gz: e2fe1c4176f7cf6c7ba7aacafbb93a40efbe68b5
3
+ metadata.gz: 14ef6df491a7c1e7219877852aade08075fd4d84
4
+ data.tar.gz: 2c9ae504062ccd239761ef0108f938e1f9440940
5
5
  SHA512:
6
- metadata.gz: 6577df17c8131523dd9f235a63c39ca222d619c8f81e9c25839d67d45106a77124f03adbf6ec84bdd28a0f9956b50a6196ee0972a8da554b12c4812052062d50
7
- data.tar.gz: aed661e662031c3819cc30aedc97f4e950ac70b0a4b79eff98f8d2a5f1e24a86c3bc99cdc4e3b341a99ab715c17cd4cb659525bfddfc0702062df201f8681f8d
6
+ metadata.gz: f7b0e379303ea7ba08fbcaaecfd323dde28a598b7cd028e6f1b0ad62c9f69e300d9b59611b5d80521870b6c263254779f59b56274e3663aa8b3a06fcc81399a3
7
+ data.tar.gz: 8813454b4a06b59f024afc2736b254a102d4b1b350a4478b531482fb270739e0f4fd4a8de1cd4727b6ca8e4739205933a3278d564b94a233403052cf593c6836
data/lib/rspectacular.rb CHANGED
@@ -1,6 +1,7 @@
1
- # Coverage Plugins Must Be Loaded Before Anything Else
2
- require 'rspectacular/plugins/code_climate.rb'
3
- require 'rspectacular/plugins/simple_cov.rb'
1
+ # These Plugins Must Be Loaded Before Anything Else
2
+ require 'rspectacular/plugins/code_climate'
3
+ require 'rspectacular/plugins/simple_cov'
4
+ require 'rspectacular/plugins/capybara'
4
5
 
5
6
  require 'rspectacular/support'
6
7
  require 'rspectacular/helpers'
@@ -1,3 +1,3 @@
1
1
  Dir[File.expand_path('../plugins/**/*.rb', __FILE__)].
2
- reject { |filename| filename.match /(code_climate|simple_cov)\.rb\z/ }.
2
+ reject { |filename| filename.match /(capybara|code_climate|simple_cov)\.rb\z/ }.
3
3
  each { |filename| require filename }
@@ -11,32 +11,38 @@
11
11
  #
12
12
  # The same goes for capybara-webkit. It must be required before rspectacular.
13
13
  #
14
- if defined?(Capybara::Driver::Base)
15
- Capybara.register_driver :chrome do |app|
16
- Capybara::Selenium::Driver.new(app, :browser => :chrome)
17
- end
14
+ begin
15
+ require 'capybara/rspec'
16
+ require 'capybara/rails'
18
17
 
19
- if defined?(Capybara::Webkit)
20
- Capybara.javascript_driver = :webkit
21
- else
22
- Capybara.javascript_driver = :selenium
23
- end
18
+ if defined?(Capybara::Driver::Base)
19
+ Capybara.register_driver :chrome do |app|
20
+ Capybara::Selenium::Driver.new(app, :browser => :chrome)
21
+ end
24
22
 
25
- RSpec.configure do |config|
26
- config.before(:each, :js => true) do
27
- page.driver.reset!
23
+ if defined?(Capybara::Webkit)
24
+ Capybara.javascript_driver = :webkit
25
+ else
26
+ Capybara.javascript_driver = :selenium
28
27
  end
29
- end
30
28
 
31
- Capybara.configure do |config|
32
- config.match = :prefer_exact
33
- config.ignore_hidden_elements = true
34
- config.visible_text_only = true
35
- end
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
36
40
 
37
- if defined?(Chamber)
38
- Capybara.default_host = Chamber.env.http.host_with_port
39
- Capybara.app_host = Chamber.env.http.base_url
40
- Capybara.server_port = Chamber.env.http.port
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
41
46
  end
47
+ rescue LoadError
42
48
  end
@@ -1,3 +1,4 @@
1
1
  if defined? ActiveRecord::Migration
2
- ActiveRecord::Migration.check_pending!
2
+ ActiveRecord::Migration.check_pending! if ActiveRecord::Migration.respond_to?(:check_pending!)
3
+ ActiveRecord::Migration.maintain_test_schema! if ActiveRecord::Migration.respond_to?(:maintain_test_schema!)
3
4
  end
@@ -4,6 +4,8 @@ if defined? RSpec::Rails
4
4
  RSpec.configure do |config|
5
5
  config.infer_base_class_for_anonymous_controllers = true
6
6
 
7
+ config.infer_spec_type_from_file_location! if config.respond_to?(:infer_spec_type_from_file_location!)
8
+
7
9
  if File.join(Dir.pwd, 'spec', 'dummy', 'config', 'environment')
8
10
  config.include RSpectacular::NamespacedEngineControllerRouteFix, :type => :controller
9
11
  end
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.38.0'
2
+ VERSION = '0.39.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspectacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfelchner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-22 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec