Sha256: f5038f79b4f75b0acc3e14529432aae98f345d69c0dc73e7fb5c06737ab43f31
Contents?: true
Size: 695 Bytes
Versions: 7
Compression:
Stored size: 695 Bytes
Contents
require 'spec_helper' require 'model/models/titled_model' require 'ronin/model/has_title' describe Model::HasTitle do subject { TitledModel } before(:all) { subject.auto_migrate! } it "should include Ronin::Model" do subject.ancestors.should include(Model) end it "should define a title property" do subject.properties.should be_named(:title) end it "should be able to find resources with similar titles" do subject.create!(:title => 'Foo one') subject.create!(:title => 'Foo bar two') resources = subject.titled('Foo') resources.length.should == 2 resources[0].title.should == 'Foo one' resources[1].title.should == 'Foo bar two' end end
Version data entries
7 entries across 7 versions & 1 rubygems