Sha256: 7ff2517a29e701c67a1475f550ae3c45b29847a91dd2f267ccb2ca104a7f0c33

Contents?: true

Size: 455 Bytes

Versions: 16

Compression:

Stored size: 455 Bytes

Contents

require_relative 'test_helper'

class MachineWithoutDatabaseTest < BaseTestCase
  def setup
    @model = new_model(false) do
      # Simulate the database not being available entirely
      def self.connection
        raise ActiveRecord::ConnectionNotEstablished
      end

      def self.connected?
        false
      end
    end
  end

  def test_should_allow_machine_creation
    assert_nothing_raised { StateMachines::Machine.new(@model) }
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
state_machines-activerecord-0.9.0 test/machine_without_database_test.rb
state_machines-activerecord-0.8.0 test/machine_without_database_test.rb
state_machines-activerecord-0.6.0 test/machine_without_database_test.rb
state_machines-activerecord-0.5.2 test/machine_without_database_test.rb
state_machines-activerecord-0.5.1 test/machine_without_database_test.rb
state_machines-activerecord-0.5.0 test/machine_without_database_test.rb
state_machines-activerecord-0.4.1 test/machine_without_database_test.rb
state_machines-activerecord-0.4.0 test/machine_without_database_test.rb
state_machines-activerecord-0.4.0.pre test/machine_without_database_test.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/state_machines-activerecord-0.2.0/test/machine_without_database_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/state_machines-activerecord-0.2.0/test/machine_without_database_test.rb
state_machines-activerecord-0.3.0 test/machine_without_database_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/state_machines-activerecord-0.2.0/test/machine_without_database_test.rb
state_machines-activerecord-0.2.0 test/machine_without_database_test.rb
state_machines-activerecord-0.1.0 test/machine_without_database_test.rb
state_machines-activerecord-0.0.1 test/machine_without_database_test.rb