Sha256: db6a7977ee4720fcaae005ce9a16989e874e24164e8c007d2879cc733f45709b

Contents?: true

Size: 409 Bytes

Versions: 2

Compression:

Stored size: 409 Bytes

Contents

require 'test_helper'

module Rooler
  class TemplateTest < ActiveSupport::TestCase
    
    test "finds an object from one of the templates rules" do
      rule = create(:rule, klass_name: 'Foo', klass_finder_method: 'active_record_finder')
      assert_nil rule.template.test_object
      
      foo1 = Foo.create
      foo2 = Foo.create
      assert_equal foo1, rule.template.test_object
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rooler-0.0.2 test/models/rooler/template_test.rb
rooler-0.0.1 test/models/rooler/template_test.rb