Skip to content

Commit

Permalink
Set up test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
huoxito committed Oct 20, 2013
1 parent aadfa1a commit 9e0ab12
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ rerun.txt
pickle-email-*.html
.project
config/initializers/secret_token.rb

Gemfile.lock
spec/dummy
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
source 'https://rubygems.org'

gem 'spree', github: 'spree/spree', branch: '2-1-stable'
gem 'pg'

# Specify your gem's dependencies in spree-adyen.gemspec
gemspec
10 changes: 9 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
require "bundler/gem_tasks"
require 'spree/testing_support/common_rake'

task :default => [:spec]

desc 'Generates a dummy app for testing'
task :test_app do
ENV['LIB_NAME'] = 'spree-adyen'
Rake::Task['common:test_app'].invoke
end
1 change: 1 addition & 0 deletions lib/spree-adyen.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'spree/adyen'
8 changes: 8 additions & 0 deletions spec/models/spree/gateway/adyen_hpp_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'spec_helper'

module Spree
describe Gateway::AdyenHPP do
it "" do
end
end
end
21 changes: 21 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/rails'
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 }

require 'spree/testing_support/factories'

RSpec.configure do |config|
config.color = true
config.mock_with :rspec

config.use_transactional_fixtures = true

config.include FactoryGirl::Syntax::Methods
end
2 changes: 2 additions & 0 deletions spree-adyen.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec-rails"
spec.add_development_dependency "factory_girl"

spec.add_runtime_dependency "adyen", "~> 1.4.0"
spec.add_runtime_dependency "spree", "~> 2.1.2"
Expand Down

0 comments on commit 9e0ab12

Please sign in to comment.