Skip to content

Instantly share code, notes, and snippets.

@no-reply
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save no-reply/3e453c2b9d305466c7f6 to your computer and use it in GitHub Desktop.
Save no-reply/3e453c2b9d305466c7f6 to your computer and use it in GitHub Desktop.
require 'spec_helper'
require 'mongoid'
describe 'Mongoid integration' do
before do
class Person
include Mongoid::Document
include ActiveTriples::Identifiable
configure :base_uri => 'http://example.org/mongoid/'
has_many :posts
field :name
def self.from_uri(uri)
self.find(id: uri.to_s.gsub(Person.resource_class.base_uri, ''))
end
end
end
subject { Person.new }
it 'tests' do
require 'pry'
binding.pry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment