Code, gemspec, and Gemfile cleanup
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::DigitalLink do
|
||||
|
||||
context 'validation' do
|
||||
it { should belong_to(:digital) }
|
||||
it { should belong_to(:line_item) }
|
||||
it { should have_valid_factory(:digital_link) }
|
||||
end
|
||||
|
||||
context "#create" do
|
||||
|
||||
@@ -4,7 +4,6 @@ describe Spree::Digital do
|
||||
|
||||
context 'validation' do
|
||||
it { should belong_to(:variant) }
|
||||
it { should have_valid_factory(:digital) }
|
||||
end
|
||||
|
||||
context "#create" do
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::LineItem do
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Order do
|
||||
|
||||
context 'validation' do
|
||||
it { should have_valid_factory(:order) }
|
||||
end
|
||||
|
||||
context "#add_variant" do
|
||||
it "should add digital Variants of quantity 1 to an order" do
|
||||
order = FactoryGirl.create(:order)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Variant do
|
||||
context "#destroy" do
|
||||
|
||||
+3
-13
@@ -2,6 +2,8 @@ ENV["RAILS_ENV"] = "test"
|
||||
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'database_cleaner'
|
||||
require 'ffaker'
|
||||
require 'shoulda-matchers'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
||||
# in spec/support/ and its subdirectories.
|
||||
@@ -16,15 +18,10 @@ Dir[File.join(File.dirname(__FILE__), "factories/*.rb")].each {|f| require f }
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.mock_with :rspec
|
||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
|
||||
config.include FactoryGirl::Syntax::Methods
|
||||
config.include Spree::Core::UrlHelpers
|
||||
config.include Spree::Core::TestingSupport::ControllerRequests
|
||||
config.include Devise::TestHelpers, :type => :controller
|
||||
|
||||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||
# examples within a transaction, remove the following line or assign false
|
||||
# instead of true.
|
||||
config.use_transactional_fixtures = false
|
||||
|
||||
config.before(:each) do
|
||||
@@ -43,11 +40,4 @@ RSpec.configure do |config|
|
||||
config.after(:each) do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
||||
|
||||
# not sure if this really adds anything, but this existed in the intial version of the spree_digital rspec testing
|
||||
RSpec::Matchers.define :have_valid_factory do |factory_name|
|
||||
match do |model|
|
||||
FactoryGirl.create(factory_name).new_record?.should be_false
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user