Sha256: 6b4abc5211f6010d0403e1c38d45c03ef5c63fcfb34da1bbdf2c90e70b3aa3d1

Contents?: true

Size: 494 Bytes

Versions: 5

Compression:

Stored size: 494 Bytes

Contents

require 'spec_helper'
require 'active_record'
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

5 entries across 5 versions & 1 rubygems

Version Path
napa-0.1.19 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.18 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.17 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.16 spec/active_record_extensions/filter_by_hash_spec.rb
napa-0.1.15 spec/active_record_extensions/filter_by_hash_spec.rb