mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Move specs on test_app/spec
This commit is contained in:
parent
aa2ef04227
commit
9d028789fd
11 changed files with 49 additions and 36 deletions
28
Rakefile
28
Rakefile
|
@ -1,28 +0,0 @@
|
|||
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
|
||||
|
||||
|
||||
desc "Run all tests"
|
||||
task :test do
|
||||
sh "bundle exec rake spec"
|
||||
end
|
||||
|
||||
|
||||
desc "Run callback tests"
|
||||
task :test_callbacks do
|
||||
sh "rspec ./spec/callback_spec.rb"
|
||||
end
|
||||
|
||||
|
||||
desc "Run generator tests"
|
||||
task :test_generators do
|
||||
sh "rspec ./spec/generator_spec.rb"
|
||||
end
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
require 'rails'
|
||||
require 'bundler/setup'
|
||||
Bundler.require
|
||||
|
||||
require 'sample_app/init'
|
||||
require 'rspec/rails'
|
||||
|
||||
require 'capybara/rspec'
|
1
spec/test_app/.rspec
Normal file
1
spec/test_app/.rspec
Normal file
|
@ -0,0 +1 @@
|
|||
--color
|
26
spec/test_app/spec/spec_helper.rb
Normal file
26
spec/test_app/spec/spec_helper.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'rspec/autorun'
|
||||
require 'capybara/rspec'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc,
|
||||
# in spec/support/ and its subdirectories.
|
||||
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
||||
|
||||
RSpec.configure do |config|
|
||||
# If true, the base class of anonymous controllers will be inferred
|
||||
# automatically. This will be the default behavior in future versions of
|
||||
# rspec-rails.
|
||||
config.infer_base_class_for_anonymous_controllers = false
|
||||
|
||||
# Run specs in random order to surface order dependencies. If you find an
|
||||
# order dependency and want to debug it, you can fix the order by providing
|
||||
# the seed, which is printed after each run.
|
||||
# --seed 1234
|
||||
config.order = "random"
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
window.Paloma = {callbacks:{}};
|
||||
|
||||
Paloma.g = {
|
||||
|
||||
/*
|
||||
Put here global code that can be used by all callbacks,
|
||||
regardless which folder they're from.
|
||||
|
||||
Example:
|
||||
|
||||
variableName: value;
|
||||
|
||||
functionName: function(params){
|
||||
alert('Paloma');
|
||||
};
|
||||
|
||||
To use the variable and function:
|
||||
Paloma.g.variableName
|
||||
Paloma.g.functionName(params);
|
||||
*/
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue