Sha256: 58b66b6bf0469a7520d95eb67d9781b5989701f646ec23174710db7dc39ff1a3
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
require 'spec_helper' Path.backfind("examples").glob("**/*.alf").each do |file| describe "Alf example: #{file}" do let(:example_path){ file } let(:example_dir) { file.parent } let(:example_db) { Alf.connect(example_dir) } let(:source){ example_path.read } context 'when optimized through relvar' do subject{ example_db.relvar(example_db.parse(source)).to_cog } it_should_behave_like "a traceable cog" end context 'when compiled through #to_cog' do subject{ example_db.parse(source).to_cog } it_should_behave_like "a traceable cog" end context 'when queried' do subject{ example_db.query(source, example_path) } it "should run without error" do subject.should be_a(Relation) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alf-core-0.15.0 | spec/integration/test_examples.rb |