Sha256: 3b5f99615cc5128dfc34a65fba72f05d5b72e99faf0aa909e683a23f2bfd8699

Contents?: true

Size: 494 Bytes

Versions: 12

Compression:

Stored size: 494 Bytes

Contents

require 'active_record'
require 'spec_helper'
require 'napa/active_record_extensions/filter_by_hash'

class Foo < ActiveRecord::Base
  include Napa::FilterByHash
end

describe Napa::FilterByHash do
  context 'when a hash is provided' do
    it 'returns an AR relation' do
      expect(Foo.filter).to be_a(ActiveRecord::Relation)
    end
  end

  context 'when nothing is provided' do
    it 'returns an AR relation' do
      expect(Foo.filter).to be_a(ActiveRecord::Relation)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
napa-0.3.0 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.2.1 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.2.0 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.29 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.28 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.26 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.25 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.24 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.23 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.22 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.21 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.20 spec/active_record_extensions/filter_by_hash_spec.rb