spec/model/targets_os_spec.rb in ronin-exploits-0.2.1 vs spec/model/targets_os_spec.rb in ronin-exploits-0.3.0

- old
+ new

@@ -3,10 +3,20 @@ require 'spec_helper' require 'model/models/targets_os_model' describe Model::TargetsOS do it "should define an os relation" do - TargetsOSModel.relationships.has_key?('os') + relationship = TargetsOSModel.relationships['os'] + + relationship.should_not be_nil + relationship.parent_model.should == OS + end + + it "should define a relationship with Arch" do + relationship = OS.relationships['targets_os_models'] + + relationship.should_not be_nil + relationship.child_model.should == TargetsOSModel end it "should provide access to the targeted os" do model = TargetsOSModel.new(:os => OS.linux('2.6.29')) model.os.should == OS.linux('2.6.29')