Sha256: 6569902c53700113d03fcdc896fa45315886c0fb050a6dd2c04c14cf9de9ce6c
Contents?: true
Size: 1.82 KB
Versions: 1
Compression:
Stored size: 1.82 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 static directory" do static_dir = File.join(@path,'static') File.directory?(static_dir).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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ronin-gen-0.2.0 | spec/generated_overlay_examples.rb |