Sha256: 9670263b34fb666ef3e27b148b811d4ebf9200cd3270407f9974ff5ef1b92b5f
Contents?: true
Size: 792 Bytes
Versions: 28
Compression:
Stored size: 792 Bytes
Contents
require 'spec_helper' class Document include CouchPotato::Persistence property :title property :content end describe "new" do context "without arguments" do subject { Document.new } it { should be_a(Document) } its(:title) { should be_nil } its(:content) { should be_nil } end context "with an argument hash" do subject { Document.new(:title => 'My Title') } it { should be_a(Document) } its(:title) { should == 'My Title'} its(:content) { should be_nil } end context "yielding to a block" do subject { Document.new(:title => 'My Title') do |doc| doc.content = 'My Content' end } it { should be_a(Document) } its(:title) { should == 'My Title'} its(:content) { should == 'My Content'} end end
Version data entries
28 entries across 28 versions & 3 rubygems