Sha256: d7a724b19e1817bf34946d2cde7de821a3cfc622b95e7ab1ead72e42884414bc

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

require_relative 'test_helper'

class IntegrationTest < BaseTestCase
  def test_should_have_an_integration_name
    assert_equal :active_record, StateMachines::Integrations::ActiveRecord.integration_name
  end

  def test_should_match_if_class_inherits_from_active_record
    assert StateMachines::Integrations::ActiveRecord.matches?(new_model)
  end

  def test_should_not_match_if_class_does_not_inherit_from_active_record
    refute StateMachines::Integrations::ActiveRecord.matches?(Class.new)
  end

  def test_should_have_defaults
    assert_equal({:action => :save}, StateMachines::Integrations::ActiveRecord.defaults)
  end

  def test_should_have_a_locale_path
    assert_not_nil StateMachines::Integrations::ActiveRecord.locale_path
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
state_machines-activerecord-0.0.1 test/integration_test.rb