Skip to content

Instantly share code, notes, and snippets.

View fredrikhenne's full-sized avatar

Fredrik Henne fredrikhenne

  • Stockholm, Sweden
View GitHub Profile
class Stylesheet
include MongoMapper::Document
class Processor
def self.errors
[]
end
attr_reader :contents
!!! 5
%html
%head
= csrf_meta_tag
= stylesheet_link_tag 'screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'ie.css', :media => 'screen, projection'
%body
- flash.each do |name, msg|
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta3"
gem "bson_ext", '1.0.1'
gem "mongoid", :git => "http://github.com/durran/mongoid.git"
gem "compass", "0.10.0"
gem "rails3-generators", :git => "http://github.com/indirect/rails3-generators.git"
gem "devise", :git => "http://github.com/plataformatec/devise.git"
group :test do
require 'rubygems'
require 'mongo'
require 'pp'
db = Mongo::Connection.new.db('testing')
db.collections.each { |c| c.remove }
articles = db['articles']
ratings = db['ratings']
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "action_controller/railtie"
require 'mongoid/railtie'
require "action_mailer/railtie"
require "active_resource/railtie"
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
source 'http://gemcutter.org'
gem "bson_ext"
gem "rails", "3.0.0.beta3"
gem "haml", ">= 3.0.0.rc.2"
gem "mongoid", :git => "http://github.com/durran/mongoid.git"
gem "devise", :git => "http://github.com/plataformatec/devise.git"
group :development do
gem "nifty-generators", :git => "http://github.com/ryanb/nifty-generators.git"
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta3"
gem "bson_ext"
gem "mongoid", :git => "http://github.com/durran/mongoid.git"
gem "haml", ">= 3.0.0.rc.2"
gem "compass", ">= 0.10.0.rc4"
gem "rails3-generators", :git => "http://github.com/indirect/rails3-generators.git"
group :test do
require 'rubygems'
require 'mongoid'
Mongoid.configure do |config|
config.master = Mongo::Connection.new.db("mongoid_pet")
end
Mongoid.master.collection("villages").drop
Mongoid.master.collection("villagers").drop
Mongoid.master.collection("pets").drop
Finished in 4.968145 seconds
1287 examples, 102 failures
rake aborted!
Command /home/fredrik/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -I"lib" "/home/fredrik/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/bin/spec" "spec/unit/mongoid_spec.rb" "spec/unit/mongoid/persistence_spec.rb" "spec/unit/mongoid/deprecation_spec.rb" "spec/unit/mongoid/contexts/mongo_spec.rb" "spec/unit/mongoid/contexts/enumerable_spec.rb" "spec/unit/mongoid/collections/master_spec.rb" "spec/unit/mongoid/collections/slaves_spec.rb" "spec/unit/mongoid/collections/cyclic_iterator_spec.rb" "spec/unit/mongoid/collections/mimic_spec.rb" "spec/unit/mongoid/dirty_spec.rb" "spec/unit/mongoid/errors_spec.rb" "spec/unit/mongoid/callbacks_spec.rb" "spec/unit/mongoid/named_scope_spec.rb" "spec/unit/mongoid/attributes_spec.rb" "spec/unit/mongoid/matchers/in_spec.rb" "spec/unit/mongoid/matchers/gte_spec.rb" "spec/unit/mongoid/matchers/ne_spec.rb" "spec/unit/mongoid/matchers/lte_spec.rb" "spec/unit/mongoid/matchers/size_spec.rb" "spec/unit/mongoid/matchers/exi