Sha256: 9bc2e15933f2406f61f9c8de4fe014c1497bffb42bdd4ccdc1c00bcfacd3ef37
Contents?: true
Size: 533 Bytes
Versions: 7
Compression:
Stored size: 533 Bytes
Contents
require 'spec_helper' require 'rails_helper' RSpec.describe StaticRecord::Base, :type => :model do it 'allows to store primary key' do Article.primary_key :author expect(Article.pkey).to eql(:author) Article.primary_key :name # restoring primary key for other tests end it "allows to access attributes defined with 'attribute'" do article = Article.find('Article One') expect(article.name).to eql('Article One') expect(article.author).to eql('The author') expect(article.rank).to eql(2) end end
Version data entries
7 entries across 7 versions & 1 rubygems