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/578d80a60bb901af0c008ae0cc6d9955 to your computer and use it in GitHub Desktop.
Save corroded/578d80a60bb901af0c008ae0cc6d9955 to your computer and use it in GitHub Desktop.
subject(:valid_things_ids) { described_class.valid_things_ids(group) }
let(:group) { 'example' }
before do
described_class::VALID_THINGS.each do |thing|
FactoryGirl.create(:something, group: 'example', name: thing)
end
end
described_class::VALID_THINGS.each do |thing|
it "contains things with the name #{thing}" do
the_thing = described_class.find_by_group_and_name('example', thing)
expect(valid_things_ids).to include the_thing.id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment