Sha256: 63821cfb3f39549c62044a8c5466f350e25cd4cff6c801e48434dd989057523f

Contents?: true

Size: 844 Bytes

Versions: 2

Compression:

Stored size: 844 Bytes

Contents

require 'ronin/model/targets_arch'

require 'spec_helper'
require 'model/models/targets_arch_model'

describe Model::TargetsArch do
  it "should define an arch relation" do
    relationship = TargetsArchModel.relationships['arch']

    relationship.should_not be_nil
    relationship.parent_model.should == Arch
  end

  it "should define a relationship with Arch" do
    relationship = Arch.relationships['targets_arch_models']

    relationship.should_not be_nil
    relationship.child_model.should == TargetsArchModel
  end

  it "should provide access to the targeted arch" do
    model = TargetsArchModel.new(:arch => Arch.i386)
    model.arch.name.should == 'i386'
  end

  it "should allow the arch to be set via the getter method" do
    model = TargetsArchModel.new
    model.arch :i386

    model.arch.name.should == 'i386'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-exploits-0.3.1 spec/model/targets_arch_spec.rb
ronin-exploits-0.3.0 spec/model/targets_arch_spec.rb