Sha256: 1dd5134b62b626447f70ed4dbbb465fd53029c1297a8046be948eee996741427
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe Outliers::Verifications::Shared do subject { Object.new.extend Outliers::Verifications::Shared } before do logger_stub = stub 'logger', :debug => true subject.stub :logger => logger_stub end context "#none_exist?" do it "should be true if no resources returned" do subject.stub :all => [] expect(subject.none_exist?).to be_true end it "should be false if resources returned" do subject.stub :all_by_key => ['test'] subject.stub :all => ['test'] expect(subject.none_exist?).to be_false end end context "#equals?" do it "should verify the list of resources equals the list of keys" do subject.stub :all_by_key => ['test'], :all => ['test_resource'] expect(subject.equals?(:keys => ['test'])).to be_true end it "should verify the list of resources equals the single key" do subject.stub :all_by_key => ['test'], :all => ['test_resource'] expect(subject.equals?(:keys => 'test')).to be_true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
outliers-0.1.1 | spec/verifications/shared_spec.rb |
outliers-0.1.0 | spec/verifications/shared_spec.rb |
outliers-0.0.1 | spec/verifications/shared_spec.rb |