require 'ronin/model/targets_os' 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') 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') end it "should allow the os to be set via the getter method" do model = TargetsOSModel.new model.os :name => 'Linux', :version => '2.6.29' model.os.name.should == 'Linux' model.os.version.should == '2.6.29' end end