Sha256: 65cfe9d0583f2324d80addcfe243b5bba27767f7d1cf07ea488ea41c145f26b6

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

require 'helper'
class ActiveRecordTest < ActiveSupport::TestCase

  test "should have method" do
    assert_respond_to ActiveRecord::Base, :has_steps
  end

  test "should raise exception if options isn't hash" do
    assert_raise Stepper::StepperException do
      ActiveRecord::Base.has_steps "something"
    end
  end

  test "should raise exception if options is wrong" do
    assert_raise Stepper::StepperException do
      ActiveRecord::Base.has_steps :some => "some", :steps => ["step1", "step2"]
    end
  end

  test "should raise exception if options haven't :steps" do
    assert_raise Stepper::StepperException do
      ActiveRecord::Base.has_steps
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stepper-0.2.0 test/models/models_test.rb
stepper-0.1.0 test/models/models_test.rb
stepper-0.0.4 test/models/models_test.rb
stepper-0.0.3 test/models/models_test.rb
stepper-0.0.1 test/models/models_test.rb