require 'test_helper' class CsvBootstrapExtTest < Test::Unit::TestCase def setup CsvBootstrapTestHelper.setup_database end def teardown Scrum.clear_bootstraps CsvBootstrapTestHelper.teardown_database end def test_should_mixin_methods assert Scrum.respond_to?(:csv_bootstrap) assert Scrum.respond_to?(:clear_bootstraps) assert Scrum.respond_to?(:bootstrap!) end def test_should_set_options options = { :target_class_name => 'Scrum', :url => CSV_URL, :sheet => 1 } CsvBootstrap.expects(:new).with(options) Scrum.csv_bootstrap options end def test_should_bootstrap Scrum.csv_bootstrap :url => CSV_URL CsvBootstrap.any_instance.expects(:bootstrap!) Scrum.bootstrap! end end