rails_spec_harness 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 +4 -4
- data/README.md +1 -1
- data/lib/generators/harness_gems/harness_gems_generator.rb +1 -0
- data/lib/generators/harness_guardfile/templates/Guardfile +1 -1
- data/lib/generators/harness_spec_helper/templates/base_spec_helper.rb +7 -4
- data/lib/generators/harness_spec_helper/templates/decorators_spec_helper.rb +2 -2
- data/lib/generators/harness_spec_helper/templates/features_spec_helper.rb +4 -1
- data/lib/generators/harness_spec_helper/templates/forms_spec_helper.rb +2 -2
- data/lib/generators/harness_spec_helper/templates/light_spec_helper.rb +2 -2
- data/lib/generators/harness_spec_helper/templates/models_spec_helper.rb +2 -2
- data/lib/rails_spec_harness/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abc6bfb6e667d5fc189b7460c7bea1b5c976e448
|
4
|
+
data.tar.gz: aa818e4bb56e69c3fd0d07d49bb8615dfd759ab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b26b64d8a464637e1e4c7c02e31408a7efd82966cd4fa62d9f9f311a3906aa82241794e1dd5e0bf4dd19bd0dcae2cb9d6513a3133f72e5a48e85d5706a98c37f
|
7
|
+
data.tar.gz: 97a34b2f09323e2292446bc41501dee10741edcf1295ab5c76b7d4c6c2a5e78dfa04541f0c1f8c9f4053b68d82e13f524b60c5123c8dd0241c0aa7274b3954e6
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ You may find in some cases you'll need to require a specific file/library in you
|
|
55
55
|
|
56
56
|
## Contributing
|
57
57
|
|
58
|
-
1. Fork it ( http://github.com
|
58
|
+
1. Fork it ( http://github.com/Originate/rails_spec_harness/fork )
|
59
59
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
60
60
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
61
61
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
guard :rspec, notification: true, cmd: 'rspec
|
1
|
+
guard :rspec, notification: true, cmd: 'rspec', spec_paths: <%= spec_paths %> do
|
2
2
|
watch(%r{^spec/(<%= spec_type_matcher %>)/.+_spec\.rb$})
|
3
3
|
watch(%r{^spec/(<%= spec_type_matcher %>)_spec_helper\.rb$}) { |m| "spec/#{m[1]}" }
|
4
4
|
watch(%r{^spec/support_(<%= spec_type_matcher %>)/(.+)\.rb$}) { |m| "spec/#{m[1]}" }
|
@@ -1,7 +1,7 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
2
|
require 'rubygems'
|
3
3
|
|
4
|
-
if ENV[
|
4
|
+
if ENV['COVERAGE']
|
5
5
|
require 'simplecov'
|
6
6
|
require 'simplecov-rcov'
|
7
7
|
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
|
@@ -11,7 +11,7 @@ end
|
|
11
11
|
RAILS_ROOT = File.expand_path('../..', __FILE__)
|
12
12
|
require 'rspec/autorun'
|
13
13
|
|
14
|
-
Dir[File.join(RAILS_ROOT, 'spec/support/**/*.rb')].each {|f| require f}
|
14
|
+
Dir[File.join(RAILS_ROOT, 'spec/support/**/*.rb')].each { |f| require f }
|
15
15
|
RSpec.configure do |config|
|
16
16
|
config.mock_with :rspec
|
17
17
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
@@ -21,4 +21,7 @@ RSpec.configure do |config|
|
|
21
21
|
end
|
22
22
|
|
23
23
|
require 'active_support'
|
24
|
-
require 'active_support/dependencies'
|
24
|
+
require 'active_support/dependencies'
|
25
|
+
require 'extend_attr_defaultable'
|
26
|
+
I18n.enforce_available_locales = false
|
27
|
+
I18n.load_path = Dir[File.join(RAILS_ROOT, 'config/locales/*.yml'), File.join(RAILS_ROOT, 'config/locals/*.rb')]
|
@@ -2,5 +2,5 @@ require 'base_spec_helper'
|
|
2
2
|
require 'responsive_service'
|
3
3
|
require 'draper'
|
4
4
|
Draper::ViewContext.test_strategy :fast
|
5
|
-
Dir[File.join(RAILS_ROOT,
|
6
|
-
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/decorators"
|
5
|
+
Dir[File.join(RAILS_ROOT, 'spec/support_decorators/**/*.rb')].each { |f| require f }
|
6
|
+
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/decorators"
|
@@ -1,14 +1,17 @@
|
|
1
1
|
require 'base_spec_helper'
|
2
|
+
require 'draper/railtie'
|
2
3
|
require File.expand_path('../../config/environment', __FILE__)
|
3
4
|
require 'rspec/rails'
|
4
5
|
require 'capybara/rspec'
|
5
6
|
require 'capybara/poltergeist'
|
6
7
|
require 'factory_girl'
|
7
8
|
require 'database_cleaner'
|
8
|
-
Dir[Rails.root.join('spec/support_features/**/*.rb')].each {|f| require f}
|
9
|
+
Dir[Rails.root.join('spec/support_features/**/*.rb')].each { |f| require f }
|
9
10
|
|
10
11
|
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
11
12
|
|
13
|
+
Draper::ViewContext.test_strategy :full
|
14
|
+
|
12
15
|
DatabaseCleaner.strategy = :truncation
|
13
16
|
|
14
17
|
Capybara.javascript_driver = :poltergeist
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'base_spec_helper'
|
2
2
|
require 'responsive_service'
|
3
3
|
require 'fob'
|
4
|
-
Dir[File.join(RAILS_ROOT,
|
5
|
-
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/forms"
|
4
|
+
Dir[File.join(RAILS_ROOT, 'spec/support_forms/**/*.rb')].each { |f| require f }
|
5
|
+
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/forms"
|
@@ -1,4 +1,4 @@
|
|
1
1
|
require 'base_spec_helper'
|
2
2
|
require 'responsive_service'
|
3
|
-
Dir[File.join(RAILS_ROOT,
|
4
|
-
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/<%= spec_type.underscore.pluralize %>"
|
3
|
+
Dir[File.join(RAILS_ROOT, 'spec/support_<%= spec_type.underscore.pluralize %>/**/*.rb')].each { |f| require f }
|
4
|
+
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/<%= spec_type.underscore.pluralize %>"
|
@@ -2,10 +2,10 @@ require 'base_spec_helper'
|
|
2
2
|
require 'active_record'
|
3
3
|
require 'rspec/rails/extensions/active_record/base'
|
4
4
|
require 'shoulda'
|
5
|
-
Dir[File.join(RAILS_ROOT,
|
5
|
+
Dir[File.join(RAILS_ROOT, 'spec/support_models/**/*.rb')].each { |f| require f }
|
6
6
|
|
7
7
|
ActiveRecord::Base.establish_connection(
|
8
8
|
YAML.load(File.read(RAILS_ROOT + '/config/database.yml'))['test']
|
9
9
|
)
|
10
10
|
|
11
|
-
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/models"
|
11
|
+
ActiveSupport::Dependencies.autoload_paths << "#{RAILS_ROOT}/app/models"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_spec_harness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alexpeachey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|