Permalink
Browse files

Tests running & passing

  • Loading branch information...
1 parent e49f550 commit 69849e87d2998af31797d2366e968e60cd421415 @iloveitaly iloveitaly committed Jan 9, 2013
View
4 spec/spec.opts → .rspec
@@ -1,6 +1,4 @@
--colour
--format
progress
---loadby
-mtime
---reverse
+mtime
View
1 Gemfile
@@ -1,4 +1,3 @@
source :rubygems
-
gemspec
View
2 spec/controllers/email_sender_controller_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe Spree::EmailSenderController do
View
31 spec/spec_helper.rb
@@ -4,37 +4,12 @@
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
-#include spree's factories
require 'spree/core/testing_support/factories'
-
-# include local factories
-Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each do |f|
- fp = File.expand_path(f)
- require fp
-end
+require 'spree/core/url_helpers'
RSpec.configure do |config|
- # == Mock Framework
- #
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
- #
- # config.mock_with :mocha
- # config.mock_with :flexmock
- # config.mock_with :rr
config.mock_with :rspec
-
config.fixture_path = "#{::Rails.root}/spec/fixtures"
-
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
- # examples within a transaction, comment the following line or assign false
- # instead of true.
- config.use_transactional_fixtures = true
+ config.use_transactional_fixtures = false
+ config.include Spree::Core::UrlHelpers
end
-
-Spree::Zone.class_eval do
- def self.global
- find_by_name("GlobalZone") || Factory(:global_zone)
- end
-end
-
-@configuration ||= Spree::AppConfiguration.find_or_create_by_name("Default configuration")
View
3 spree_email_to_friend.gemspec
@@ -17,5 +17,8 @@ Gem::Specification.new do |s|
s.add_dependency 'spree_core', '~> 1.3.0'
s.add_dependency 'recaptcha', '>= 0.3.1'
+
s.add_development_dependency 'rspec-rails'
+ s.add_development_dependency 'sqlite3'
+ s.add_development_dependency 'factory_girl', '~> 2.6'
end

0 comments on commit 69849e8

Please sign in to comment.