rspectacular 0.2.0 → 0.3.0

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.
@@ -1,3 +1,3 @@
1
- if defined? Capybara
1
+ if defined?(Capybara::Driver::Base)
2
2
  Dir[File.expand_path('../helpers/**/*.rb', __FILE__)].each { |f| require f }
3
3
  end
@@ -1,3 +1,3 @@
1
- if defined? Capybara::Webkit
1
+ if defined?(Capybara::Driver::Base) && defined?(Capybara::Webkit)
2
2
  Capybara.javascript_driver = :webkit
3
3
  end
@@ -1,7 +1,5 @@
1
- if defined? DatabaseCleaner && defined? RSpec::Rails
1
+ if defined? DatabaseCleaner
2
2
  RSpec.configure do |config|
3
- config.use_transactional_fixtures = false
4
-
5
3
  config.before(:suite) do
6
4
  DatabaseCleaner.clean_with(:truncation)
7
5
  end
@@ -22,8 +20,16 @@ if defined? DatabaseCleaner && defined? RSpec::Rails
22
20
  DatabaseCleaner.clean
23
21
  end
24
22
  end
23
+
24
+ if defined? RSpec::Rails
25
+ RSpec.configure do |config|
26
+ config.use_transactional_fixtures = false
27
+ end
28
+ end
25
29
  else
26
- RSpec.configure do |config|
27
- config.use_transactional_fixtures = true
30
+ if defined? RSpec::Rails
31
+ RSpec.configure do |config|
32
+ config.use_transactional_fixtures = true
33
+ end
28
34
  end
29
35
  end
@@ -1,4 +1,4 @@
1
- if defined? Capybara
1
+ if defined?(Capybara::Driver::Base)
2
2
  RSpec.configure do |config|
3
3
  config.after(:each, :facebook => true) do
4
4
  visit 'https://www.facebook.com'
@@ -5,8 +5,8 @@ begin
5
5
  rescue LoadError
6
6
  end
7
7
 
8
- rails_database_yaml_file_path = File.expand_path('../config/database.yml', __FILE__)
9
- rails_engine_database_yaml_file_path = File.expand_path('../dummy/config/database.yml', __FILE__)
8
+ rails_database_yaml_file_path = File.expand_path('../../config/database.yml', __FILE__)
9
+ rails_engine_database_yaml_file_path = File.expand_path('../../dummy/config/database.yml', __FILE__)
10
10
 
11
11
  database_yaml_file_path = if File.exist? rails_engine_database_yaml_file_path
12
12
  rails_engine_database_yaml_file_path
@@ -24,11 +24,4 @@ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
24
24
  RSpec.configure do |config|
25
25
  config.order = 'random'
26
26
  config.color = true
27
-
28
- config.around do |example|
29
- ActiveRecord::Base.transaction do
30
- example.run
31
- raise ActiveRecord::Rollback
32
- end
33
- end
34
27
  end
@@ -1,3 +1,3 @@
1
1
  module RSpectacular
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspectacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-26 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec