spec/model/has_description_spec.rb in ronin-1.0.0.rc1 vs spec/model/has_description_spec.rb in ronin-1.0.0.rc2
- old
+ new
@@ -4,12 +4,14 @@
require 'ronin/model/has_description'
describe Model::HasDescription do
subject { DescribedModel }
- before(:all) do
- subject.auto_migrate!
+ before(:all) { subject.auto_migrate! }
+
+ it "should include Ronin::Model" do
+ subject.ancestors.should include(Model)
end
it "should define a description property" do
subject.properties.should be_named(:description)
end
@@ -50,12 +52,12 @@
it "should be able to find resources with similar descriptions" do
subject.create!(:description => 'foo one')
subject.create!(:description => 'foo bar two')
- models = subject.describing('foo')
+ resources = subject.describing('foo')
- models.length.should == 2
- models[0].description.should == 'foo one'
- models[1].description.should == 'foo bar two'
+ resources.length.should == 2
+ resources[0].description.should == 'foo one'
+ resources[1].description.should == 'foo bar two'
end
end