Sha256: 95f7bf40c0de5c591fcde9131a75756fd1cbc6bae2101833552f59ff1c12b763
Contents?: true
Size: 578 Bytes
Versions: 6
Compression:
Stored size: 578 Bytes
Contents
require 'spec_helper' module MongoModel shared_examples_for "ActiveModel" do require 'test/unit/assertions' include Test::Unit::Assertions include ActiveModel::Lint::Tests ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m| example m.gsub('_',' ') do send m end end let(:model) { subject } end specs_for(Document, EmbeddedDocument) do define_class(:TestModel, described_class) subject { TestModel.new } it_should_behave_like "ActiveModel" end end
Version data entries
6 entries across 6 versions & 1 rubygems