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