This repository has been archived by the owner on Nov 29, 2019. It is now read-only.
forked from railsdog/spree-paypal-express
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeff Dutil
committed
Nov 26, 2012
1 parent
c7f55c4
commit 9a2234d
Showing
3 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
*.swp | ||
.DS_store | ||
spec/test_app | ||
spec/dummy | ||
.rvmrc | ||
.sass-cache | ||
.bundle | ||
coverage | ||
Gemfile.lock | ||
spec/test_app | ||
spec/dummy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,45 @@ | ||
# Setup simplecov first to make sure coverage happens through everything. | ||
require 'simplecov' | ||
SimpleCov.start do | ||
add_filter '/config/' | ||
add_group 'Controllers', 'app/controllers' | ||
add_group 'Helpers', 'app/helpers' | ||
add_group 'Mailers', 'app/mailers' | ||
add_group 'Models', 'app/models' | ||
add_group 'Libraries', 'lib' | ||
add_group 'Specs', 'spec' | ||
end | ||
|
||
# This file is copied to ~/spec when you run 'ruby script/generate rspec' | ||
# from the project root directory. | ||
ENV["RAILS_ENV"] ||= 'test' | ||
require File.expand_path("../dummy/config/environment", __FILE__) | ||
require 'rspec/rails' | ||
require 'capybara/rspec' | ||
|
||
require 'factory_girl' | ||
FactoryGirl.find_definitions | ||
require 'ffaker' | ||
|
||
# Requires supporting ruby files with custom matchers and macros, etc, | ||
# in spec/support/ and its subdirectories. | ||
Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f } | ||
|
||
#include spree's factories | ||
# Requires factories defined in spree_core | ||
require 'spree/core/testing_support/factories' | ||
require 'spree/core/testing_support/fixtures' | ||
|
||
# include local factories | ||
Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each do |f| | ||
fp = File.expand_path(f) | ||
require fp | ||
end | ||
|
||
require 'ffaker' | ||
require 'spree/core/testing_support/authorization_helpers' | ||
require 'spree/core/url_helpers' | ||
|
||
RSpec.configure do |config| | ||
config.include FactoryGirl::Syntax::Methods | ||
config.include Spree::Core::UrlHelpers | ||
config.color = true | ||
config.mock_with :rspec | ||
|
||
config.fixture_path = "#{::Rails.root}/spec/fixtures" | ||
|
||
config.use_transactional_fixtures = true | ||
config.include Spree::UrlHelpers | ||
end | ||
|
||
Spree::Zone.class_eval do | ||
def self.global | ||
find_by_name("GlobalZone") || Factory(:global_zone) | ||
find_by_name("GlobalZone") || FactoryGirl.create(:global_zone) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters