Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 22 lines (18 sloc) 0.446 kb
7fb6f64 @pk Initial commit to sequel_sluggable.
authored
1 $LOAD_PATH.unshift(File.dirname(__FILE__))
2 $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
a46fe08 @pk Initial implementation.
authored
3 require 'sequel'
7fb6f64 @pk Initial commit to sequel_sluggable.
authored
4 require 'sequel_sluggable'
5 require 'spec'
6 require 'spec/autorun'
7
0e36c99 @pk Version 0.0.2
authored
8 # Create model to test on
a46fe08 @pk Initial implementation.
authored
9 DB = Sequel.sqlite
10 DB.create_table :items do
11 primary_key :id
12 String :name
13 String :slug
4081f41 @pk Allow to generate slug before the before_save
authored
14 String :sluggie
a46fe08 @pk Initial implementation.
authored
15 end
16
17 class Item < Sequel::Model; end
18
7fb6f64 @pk Initial commit to sequel_sluggable.
authored
19 Spec::Runner.configure do |config|
a46fe08 @pk Initial implementation.
authored
20 config.after(:each) { Item.delete }
7fb6f64 @pk Initial commit to sequel_sluggable.
authored
21 end
Something went wrong with that request. Please try again.