Sha256: a6c54bd8d32f132e3274b15d9a7b6b1439b6ecc321c4dbf00fed32c02293497d
Contents?: true
Size: 823 Bytes
Versions: 4
Compression:
Stored size: 823 Bytes
Contents
require 'rspec' require 'spec_helper' module Sqldump describe Formatter do context "dump_mode is :csv" do it "creates a CsvFormatter" do options = double("Options") options.stub(:dump_mode).and_return(:csv) formatter = Formatter.formatter(nil, nil, options) formatter.class.should == CsvFormatter end end context "dump_mode is :insert" do class InsertFormatter def setup_column_type_mapping @column_type_by_name = {} end end it "creates an InsertFormatter" do options = double("Options") options.stub(:dump_mode).and_return(:insert) formatter = Formatter.formatter(double("sth").as_null_object, nil, options) formatter.class.should == InsertFormatter end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sqldump-0.0.4 | spec/sqldump/formatter_spec.rb |
sqldump-0.0.3 | spec/sqldump/formatter_spec.rb |
sqldump-0.0.2 | spec/sqldump/formatter_spec.rb |
sqldump-0.0.1 | spec/sqldump/formatter_spec.rb |