spec/integration/relation_schema_spec.rb in rom-sql-1.0.1 vs spec/integration/relation_schema_spec.rb in rom-sql-1.0.2

- old
+ new

@@ -1,7 +1,8 @@ RSpec.describe 'Inferring schema from database' do - include_context 'database setup' + include_context 'users' + include_context 'posts' with_adapters do context "when database schema exists" do it "infers the schema from the database relations" do conf.relation(:users) @@ -11,16 +12,14 @@ end end context "for empty database schemas" do it "returns an empty schema" do - drop_tables - - expect { container.not_here }.to raise_error(NoMethodError) + expect { container.users }.to raise_error(NoMethodError) end end - context 'defining associations' do + context 'defining associations', seeds: false do it "allows defining a one-to-many" do class Test::Posts < ROM::Relation[:sql] schema(:posts) do associations do one_to_many :tags