Sha256: 27c0ab4796ed3e3cfac9d0d59a3172389f0d8bc8f0b3cdf294644824e19c0d62

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

require 'test_helper'

module Spyke
  class CallbacksTest < Minitest::Test
    def setup
      stub_request(:any, /.*/)
    end

    def test_before_create
      Recipe.any_instance.expects(:before_create_callback)
      Recipe.create
    end

    def test_before_save
      Recipe.any_instance.expects(:before_save_callback)
      Recipe.create
    end

    def test_before_update
      Recipe.any_instance.expects(:before_save_callback)
      Recipe.any_instance.expects(:before_update_callback)
      Recipe.new(id: 1).save
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spyke-7.2.2 test/callbacks_test.rb