Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixtures are small. Move to spec helper.

  • Loading branch information...
commit 4db5941383208a5b98ed0ccfe032154ac0d75aef 1 parent c179e9e
@benhamill benhamill authored
View
9 spec/fixtures/character.rb
@@ -1,9 +0,0 @@
-require 'active_record'
-
-class Character < ActiveRecord::Base
- # string :name
- # string :description
- # integer :web_comic_id
-
- belongs_to :web_comic
-end
View
25 spec/spec_helper.rb
@@ -4,6 +4,31 @@
require 'texticle'
require 'shoulda'
require 'pry'
+require 'active_record'
config = YAML.load_file File.expand_path(File.dirname(__FILE__) + '/config.yml')
ActiveRecord::Base.establish_connection config.merge(:adapter => :postgresql)
+
+class WebComic < ActiveRecord::Base
+ # string :name
+ # string :author
+ # integer :id
+
+ has_many :characters
+end
+
+class Character < ActiveRecord::Base
+ # string :name
+ # string :description
+ # integer :web_comic_id
+
+ belongs_to :web_comic
+end
+
+class Game < ActiveRecord::Base
+ # string :system
+ # string :title
+ # text :description
+end
+
+class GameFail < Game; end
View
1  spec/texticle/searchable_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'fixtures/webcomic'
require 'texticle/searchable'
class SearchableTest < Test::Unit::TestCase
View
3  spec/texticle_spec.rb
@@ -1,8 +1,5 @@
# coding: utf-8
require 'spec_helper'
-require 'fixtures/webcomic'
-require 'fixtures/character'
-require 'fixtures/game'
class TexticleTest < Test::Unit::TestCase
context "after extending ActiveRecord::Base" do

0 comments on commit 4db5941

Please sign in to comment.
Something went wrong with that request. Please try again.