spec/groovy_spec.rb in groovy-0.5.1 vs spec/groovy_spec.rb in groovy-0.6.0
- old
+ new
@@ -3,9 +3,21 @@
describe Groovy do
before :each do
Groonga::Context.default = nil
end
+ it 'explodes if opening a scheme without opening first' do
+ expect do
+ class Foobar; end
+ Foobar.class_eval do
+ include Groovy::Model
+ schema do |t|
+ t.string :foobar
+ end
+ end
+ end.to raise_error("Context not defined: Please call Groovy.open('./db/path') first.")
+ end
+
describe '.open' do
it 'explodes if called with no params' do
expect do
Groovy.open
end.to raise_error(ArgumentError)
\ No newline at end of file