rspectacular 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rspectacular/helpers.rb +1 -1
- data/lib/rspectacular/plugins/capybara.rb +1 -1
- data/lib/rspectacular/plugins/database_cleaner.rb +11 -5
- data/lib/rspectacular/plugins/facebook.rb +1 -1
- data/lib/rspectacular/spec_helpers/active_record_spec_helper.rb +2 -9
- data/lib/rspectacular/version.rb +1 -1
- metadata +2 -2
data/lib/rspectacular/helpers.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
if defined? DatabaseCleaner
|
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
|
-
|
27
|
-
|
30
|
+
if defined? RSpec::Rails
|
31
|
+
RSpec.configure do |config|
|
32
|
+
config.use_transactional_fixtures = true
|
33
|
+
end
|
28
34
|
end
|
29
35
|
end
|
@@ -5,8 +5,8 @@ begin
|
|
5
5
|
rescue LoadError
|
6
6
|
end
|
7
7
|
|
8
|
-
rails_database_yaml_file_path = File.expand_path('
|
9
|
-
rails_engine_database_yaml_file_path = File.expand_path('
|
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
|
data/lib/rspectacular/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|