Skip to content

Instantly share code, notes, and snippets.

@corroded
Last active April 10, 2018 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corroded/e55728e91c5a1a01bb2b5186183a63ad to your computer and use it in GitHub Desktop.
Save corroded/e55728e91c5a1a01bb2b5186183a63ad to your computer and use it in GitHub Desktop.
subject(:valid_things_ids) { described_class.valid_things_ids(group) }
let(:group) { 'blurb' }
let!(:random_thing) { FactoryGirl.create(:something, group: 'blurb', id: 111) }
let!(:another_thing) { FactoryGirl.create(:something, group: 'blurb', id: 222) }
let!(:not_included) { FactoryGirl.create(:something, group: 'shrug', id: 333) }
it do
expect(valid_things_ids).to include 111
expect(valid_things_ids).to include 222
expect(valid_things_ids).not_to include 333
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment