Sha256: 66e02c9f03449768d36fa9e1342caa85969b38247612329d7b96907a70f7c1a4

Contents?: true

Size: 747 Bytes

Versions: 1

Compression:

Stored size: 747 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
seamusabshere-csv_bootstrap-0.1.0 test/csv_bootstrap_ext_test.rb