forked from refinery/refinerycms-inquiries
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
7 changed files
with
166 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
Gemfile.lock | ||
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
before_script: | ||
- "bundle exec rake refinery:testing:dummy_app > /dev/null" | ||
script: "bundle exec rspec ./spec" | ||
notifications: | ||
email: | ||
- parndt@gmail.com | ||
- ugis.ozolss@gmail.com | ||
env: | ||
- DB=postgres | ||
- DB=mysql | ||
- DB=sqlite3 | ||
rvm: | ||
- 1.8.7 | ||
- ree | ||
- 1.9.2 | ||
- 1.9.3 | ||
- rbx | ||
- jruby |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
source 'http://rubygems.org' | ||
|
||
gemspec | ||
|
||
git 'git://github.com/resolve/refinerycms.git' do | ||
gem 'refinerycms' | ||
|
||
group :development, :test do | ||
gem 'refinerycms-testing' | ||
end | ||
end | ||
|
||
group :development, :test do | ||
require 'rbconfig' | ||
|
||
gem 'sqlite3' | ||
gem 'mysql2' | ||
gem 'pg' | ||
|
||
platforms :mswin, :mingw do | ||
gem 'win32console' | ||
gem 'rb-fchange', '~> 0.0.5' | ||
gem 'rb-notifu', '~> 0.0.4' | ||
end | ||
|
||
platforms :ruby do | ||
gem 'spork', '0.9.0.rc9' | ||
gem 'guard-spork' | ||
|
||
unless ENV['TRAVIS'] | ||
if RbConfig::CONFIG['target_os'] =~ /darwin/i | ||
gem 'rb-fsevent', '>= 0.3.9' | ||
gem 'growl', '~> 1.0.3' | ||
end | ||
if RbConfig::CONFIG['target_os'] =~ /linux/i | ||
gem 'rb-inotify', '>= 0.5.1' | ||
gem 'libnotify', '~> 0.1.3' | ||
gem 'therubyracer', '~> 0.9.9' | ||
end | ||
end | ||
end | ||
|
||
platforms :jruby do | ||
unless ENV['TRAVIS'] | ||
if RbConfig::CONFIG['target_os'] =~ /darwin/i | ||
gem 'growl', '~> 1.0.3' | ||
end | ||
if RbConfig::CONFIG['target_os'] =~ /linux/i | ||
gem 'rb-inotify', '>= 0.5.1' | ||
gem 'libnotify', '~> 0.1.3' | ||
end | ||
end | ||
end | ||
end | ||
|
||
# Refinery/rails should pull in the proper versions of these | ||
group :assets do | ||
gem 'sass-rails' | ||
gem 'coffee-rails' | ||
gem 'uglifier' | ||
end | ||
|
||
gem 'jquery-rails' |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env rake | ||
begin | ||
require 'bundler/setup' | ||
rescue LoadError | ||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | ||
end | ||
|
||
ENGINE_PATH = File.dirname(__FILE__) | ||
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) | ||
|
||
if File.exists?(APP_RAKEFILE) | ||
load 'rails/tasks/engine.rake' | ||
end | ||
|
||
require "refinerycms-testing" | ||
Refinery::Testing::Railtie.load_tasks | ||
Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH) | ||
|
||
load File.expand_path('../tasks/rspec.rake', __FILE__) |
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
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
require 'rubygems' | ||
|
||
def setup_environment | ||
# Configure Rails Environment | ||
ENV["RAILS_ENV"] ||= 'test' | ||
|
||
require File.expand_path("../dummy/config/environment", __FILE__) | ||
|
||
require 'rspec/rails' | ||
require 'capybara/rspec' | ||
require 'factory_girl_rails' | ||
|
||
Rails.backtrace_cleaner.remove_silencers! | ||
|
||
RSpec.configure do |config| | ||
config.mock_with :rspec | ||
config.treat_symbols_as_metadata_keys_with_true_values = true | ||
config.filter_run :focus => true | ||
config.run_all_when_everything_filtered = true | ||
end | ||
|
||
# set javascript driver for capybara | ||
Capybara.javascript_driver = :selenium | ||
|
||
# minimize password hashing stretches | ||
Devise.stretches = 1 | ||
end | ||
|
||
def each_run | ||
ActiveSupport::Dependencies.clear | ||
|
||
FactoryGirl.reload | ||
|
||
# Requires supporting files with custom matchers and macros, etc, | ||
# in ./support/ and its subdirectories including factories. | ||
([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p| | ||
Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s] | ||
}.flatten.sort.each do |support_file| | ||
require support_file | ||
end | ||
end | ||
|
||
# If spork is available in the Gemfile it'll be used but we don't force it. | ||
unless (begin; require 'spork'; rescue LoadError; nil end).nil? | ||
Spork.prefork do | ||
# Loading more in this block will cause your tests to run faster. However, | ||
# if you change any configuration or code from libraries loaded here, you'll | ||
# need to restart spork for it take effect. | ||
setup_environment | ||
end | ||
|
||
Spork.each_run do | ||
# This code will be run each time you run your specs. | ||
each_run | ||
end | ||
else | ||
setup_environment | ||
each_run | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require 'rspec/core/rake_task' | ||
|
||
desc "Run specs" | ||
RSpec::Core::RakeTask.new |