Skip to content

Commit

Permalink
Switch over to using common_rake to build test app
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Jan 14, 2013
1 parent fa80461 commit a1bcc6e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 59 deletions.
25 changes: 10 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
require 'rake'
require 'rake/testtask'
require 'rbconfig'
require 'bundler'
Bundler::GemHelper.install_tasks

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new("spec:translations") do |spec|
spec.pattern = 'spec/unit/**/*_spec.rb'
end
require 'spree/core/testing_support/common_rake'

require 'i18n-spec/tasks' # needs to be loaded after rspec
RSpec::Core::RakeTask.new

# Load any custom rakefiles for extension
Dir[ File.expand_path('lib/tasks/*.rake', File.dirname(__FILE__)) ].sort.each { |f| load f }
task :default => [:spec]

task :default => :spec
desc 'Generates a dummy app for testing'
task :test_app do
ENV['LIB_NAME'] = 'spree_i18n'
Rake::Task['common:test_app'].invoke
end
10 changes: 3 additions & 7 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
ENV["RAILS_ENV"] = "test"

require 'yaml'
require 'rspec'
require 'i18n'
require File.expand_path('../dummy/config/environment.rb', __FILE__)

require 'i18n-spec'
require 'i18n/core_ext/hash'
require 'active_support/core_ext/kernel/reporting'
require 'support/fake_app'
require 'rspec/rails'
require 'support/be_a_thorough_translation_of_matcher'

RSpec.configure do |config|
config.mock_with :rspec
config.fail_fast = true
end
29 changes: 0 additions & 29 deletions spec/support/fake_app.rb

This file was deleted.

12 changes: 4 additions & 8 deletions spree_i18n.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

s.add_dependency 'rails-i18n'
s.add_dependency('spree', '>= 1.1')
s.add_dependency('i18n', '~> 0.5')
s.add_development_dependency "rails", ">= 3.0.0"
s.add_development_dependency "rspec-rails", ">= 2.7.0"
s.add_development_dependency "i18n-spec", ">= 0.2"
s.add_development_dependency "spork", "~> 1.0rc"
s.add_dependency('spree', '~> 1.3')
s.add_dependency('i18n', '~> 0.6')
s.add_development_dependency 'i18n-spec', '~> 0.3.0'
s.add_development_dependency "rspec-rails", "~> 2.12.0"
s.add_development_dependency "sqlite3", "~> 1.3.6"
s.add_development_dependency "i18n-spec"
end

0 comments on commit a1bcc6e

Please sign in to comment.