Sha256: 5249f3021b9baec10ab130bd98c4ef8c2256b6659d25f98a22563b0bca46b904
Contents?: true
Size: 1.19 KB
Versions: 43
Compression:
Stored size: 1.19 KB
Contents
#! /usr/bin/env rspec require 'spec_helper' module MCollective module Generators describe DataGenerator do before :each do DataGenerator.stubs(:create_metadata_string).returns("meta\n") end describe "#create_ddl" do it "create the correct ddl string" do DataGenerator.any_instance.stubs(:create_plugin_content) DataGenerator.any_instance.stubs(:create_plugin_string) DataGenerator.any_instance.stubs(:write_plugins) ddl = DataGenerator.new("foo", ["output"]).ddl expected = File.read(File.join(File.dirname(__FILE__), "snippets", "data_ddl")).chop ddl.should == expected end end describe "#create_plugin_content" do it "should create the correct plugin content" do DataGenerator.any_instance.stubs(:create_ddl) DataGenerator.any_instance.stubs(:create_plugin_string) DataGenerator.any_instance.stubs(:write_plugins) ddl = DataGenerator.new("foo", ["output"]).content ddl.should == " query do |what|\n result[:output] = nil\n end\n" end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems