Sha256: 29460283aa40c7b3f0c5925c81e4e70e5b0452a5e16881fccc3df0e9142a77f4

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'

describe ActiveData::Model do

  let(:model) do
    Class.new do
      include ActiveData::Model

      attribute :name
      attribute :count, default: 0
    end
  end

  specify{model.i18n_scope.should == :active_data}
  specify{model.new.should_not be_persisted}
  specify{model.instantiate.should be_an_instance_of model}
  specify{model.instantiate.should be_persisted}

  context 'Fault tolerance' do
    specify{expect{model.new(:foo => 'bar')}.not_to raise_error}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_data-0.0.1 spec/lib/active_data/model_spec.rb