Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jacquescrocker's full-sized avatar

Jacques Crocker jacquescrocker

View GitHub Profile
@jacquescrocker
jacquescrocker / gist:9301184
Created March 2, 2014 02:54
hash_no_back_hack.coffee
# override ember's hashlocation to not do back/forward functionality
Ember.HashLocation.reopen({
setURL: (path) ->
@replaceURL(path)
})
class MyPlugin::Railtie < Rails::Railtie
initializer :my_plugin_routes do |app|
app.routes.draw do
# .. my plugin routes here ...
end
end
end
# if Gem is defined i'll assume you are using rubygems and lock specific versions
# call me crazy but a plain old require will just get the latest version you have installed
# so i want to make sure that if you are using gems you do in fact have the correct versions
# if there is a better way to do this, please enlighten me!
if self.class.const_defined?(:Gem)
gem 'activesupport', '>= 2.3'
gem 'mongo', '0.19.1'
gem 'jnunemaker-validatable', '1.8.3'
end
class Site
include MongoMapper::Document
key :layout_id
belongs_to :layout
end
class Layout
include MongoMapper::Document
end
DEPRECATION WARNING: ActionController::Base.session= is deprecated. Please configure it on your application with config.session_store :cookie_store, :key => '....'. (called from /Users/jc/Gems/devise/test/rails_app/config/initializers/session_store.rb:7)
/Users/jc/.rvm/gems/ruby-1.8.7-p249%devisedev/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/testing/integration.rb:437: superclass mismatch for class IntegrationTest (TypeError)
from /Users/jc/.rvm/gems/ruby-1.8.7-p249%devisedev/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_controller/deprecated/integration_test.rb:1
from ./test/support/integration.rb:1
from /Users/jc/.rvm/gems/ruby-1.8.7-p249%devisedev/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/dependencies.rb:209:in `require'
from /Users/jc/.rvm/gems/ruby-1.8.7-p249%devisedev/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesuppor
[jc@macbookpro ~/Gems/devise(master)]# rake test DEVISE_ORM=mongo_mapper
(in /Users/jc/Gems/devise)
/Users/jc/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -I"lib:lib:test" "/Users/jc/.rvm/gems/ruby-1.8.7-p249%global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/controllers/helpers_test.rb" "test/controllers/internal_helpers_test.rb" "test/controllers/url_helpers_test.rb" "test/devise_test.rb" "test/encryptors_test.rb" "test/failure_app_test.rb" "test/integration/authenticatable_test.rb" "test/integration/confirmable_test.rb" "test/integration/http_authenticatable_test.rb" "test/integration/lockable_test.rb" "test/integration/recoverable_test.rb" "test/integration/registerable_test.rb" "test/integration/rememberable_test.rb" "test/integration/timeoutable_test.rb" "test/integration/token_authenticatable_test.rb" "test/integration/trackable_test.rb" "test/mailers/confirmation_instructions_test.rb" "test/mailers/reset_password_instructions_test.rb" "test/mailers/unlock_instructions_test.rb" "test/mapping_test.rb" "
1) Failure:
test: Adding validation errors should work with validate callback. (ValidationsTest)
[/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/jnunemaker-matchy-0.4.0/lib/matchy/matcher_builder.rb:38:in `fail!'
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/jnunemaker-matchy-0.4.0/lib/matchy/expectation_builder.rb:6:in `build_expectation'
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/jnunemaker-matchy-0.4.0/lib/matchy/modals.rb:12:in `should'
test/unit/test_validations.rb:538:in `__bind_1269363649_589333'
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/shoulda-2.10.2/lib/shoulda/context.rb:351:in `call'
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/shoulda-2.10.2/lib/shoulda/context.rb:351:in `test: Adding validation errors should work with validate callback. '
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rails3beta/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
/Users/jc/.rvm/gems/ruby-1.8.7-p249%rail
[jc@macbookpro ~/Gems/devise(master)]# rake test DEVISE_ORM=mongo_mapper
(in /Users/jc/Gems/devise)
/Users/jc/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -I"lib:lib:test" "/Users/jc/.rvm/gems/ruby-1.8.7-p249%global/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/controllers/helpers_test.rb" "test/controllers/internal_helpers_test.rb" "test/controllers/url_helpers_test.rb" "test/devise_test.rb" "test/encryptors_test.rb" "test/failure_app_test.rb" "test/integration/authenticatable_test.rb" "test/integration/confirmable_test.rb" "test/integration/http_authenticatable_test.rb" "test/integration/lockable_test.rb" "test/integration/recoverable_test.rb" "test/integration/registerable_test.rb" "test/integration/rememberable_test.rb" "test/integration/timeoutable_test.rb" "test/integration/token_authenticatable_test.rb" "test/integration/trackable_test.rb" "test/mailers/confirmation_instructions_test.rb" "test/mailers/reset_password_instructions_test.rb" "test/mailers/unlock_instructions_test.rb" "test/mapping_test.rb" "
require "spec_helper"
describe Mongoid::Document do
before do
Dog.delete_all
end
describe "changed?" do
context "newly created model" do
(rdb:1) Rails::DataMapper.configuration
#<Rails::DataMapper::Configuration:0x106d62de0 @adapter_cascade=Rails::DataMapper::Adapters::Cascade, @root=#<Pathname:/Users/jc/Gems/devise/test/rails_app>, @raw={"production"=>{"adapter"=>"sqlite3", "database"=>":memory:"}, "development"=>{"adapter"=>"sqlite3", "database"=>":memory:"}, "test"=>{"adapter"=>"sqlite3", "database"=>":memory:"}}, @repositories={"production"=>{"default"=>{"adapter"=>"sqlite3", "database"=>"/Users/jc/Gems/devise/test/rails_app/:memory:"}}, "development"=>{"default"=>{"adapter"=>"sqlite3", "database"=>"/Users/jc/Gems/devise/test/rails_app/:memory:"}}, "test"=>{"default"=>{"adapter"=>"sqlite3", "database"=>"/Users/jc/Gems/devise/test/rails_app/:memory:"}}}, @identity_map=true>