Sha256: 7aaff37ba1bd55a41c9dcf8edd82485a9f2b5c4e8593c1f6e6c0f2fac4022887
Contents?: true
Size: 1.69 KB
Versions: 2
Compression:
Stored size: 1.69 KB
Contents
require 'ronin/platform/overlay' require 'spec_helper' require 'nokogiri' shared_examples_for "Generated Overlay" do it "should create the overlay directory" do File.directory?(@path).should == true end it "should create a lib directory" do lib_dir = File.join(@path,Ronin::Platform::Overlay::LIB_DIR) File.directory?(lib_dir).should == true end it "should create a objects directory" do objects_dir = File.join(@path,Ronin::Platform::Overlay::OBJECTS_DIR) File.directory?(objects_dir).should == true end it "should create a Rakefile" do rakefile = File.join(@path,'Rakefile') File.file?(rakefile).should == true end it "should create a XML metadata file" do metadata_file = File.join(@path,Ronin::Platform::Overlay::METADATA_FILE) File.file?(metadata_file).should == true end describe "XML metadata file" do before(:all) do @doc = Nokogiri::XML(open(File.join(@path,Ronin::Platform::Overlay::METADATA_FILE))) end it "should have the title" do @doc.at('/ronin-overlay/title').inner_text.should == @title end it "should have the source URL" do @doc.at('/ronin-overlay/source').inner_text.should == @source end it "should have the source-view URL" do @doc.at('/ronin-overlay/source-view').inner_text.should == @source_view end it "should have the website URL" do @doc.at('/ronin-overlay/website').inner_text.should == @website end it "should have the license" do @doc.at('/ronin-overlay/license').inner_text.should == @license end it "should have the description" do @doc.at('/ronin-overlay/description').inner_text.should == @description end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ronin-gen-0.1.1 | spec/generated_overlay_examples.rb |
ronin-gen-0.1.0 | spec/generated_overlay_examples.rb |