Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe XMLAudit do
- describe :new do
- it "should take as parameters the file path of the XML file to audit and the audit event listener to parse the XML" do
- lambda {
- XMLAudit.new File.dirname(__FILE__) + "/../data/recv_audit.log", mock("Audit Listener")
- }.should_not raise_error
- end
- it "should raise an error if not provided a valid file path" do
- lambda {
- XMLAudit.new "crap", mock("Audit Listener")
- }.should raise_error
- end
- end
- describe :report do
- before(:all) do
- @audit = XMLAudit.new RECV_AUDIT, stub_everything("Audit Listener")
- end
- it "should support a report method" do
- lambda {
- @audit.report
- }.should_not raise_error
- end
- describe "return value" do
- it "should be a non-nil String" do
- str = @audit.report
- str.should_not be_nil
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment