Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Delete unused model classes from specs

  • Loading branch information...
commit 55db5f0d436ba2165fdca5c953ee76ec589c770b 1 parent d59e451
@johnnyshields johnnyshields authored
View
24 spec/fixtures/active_record/schema.rb
@@ -1,36 +1,14 @@
ActiveRecord::Schema.define do
self.verbose = false
- create_table :invoices, :force => true do |t|
- t.integer :value
- t.integer :number
- t.timestamps
- end
-
create_table :posts, :force => true do |t|
t.string :text
t.timestamps
end
- create_table :posts_tags, :force => true, :id => false do |t|
- t.integer :post_id, :tag_id
- end
-
- create_table :tags, :force => true do |t|
- t.string :name
- t.timestamps
- end
-
create_table :events, :force => true do |t|
t.datetime :start_time, :end_time
t.string :name
t.boolean :public, :default => true
end
-
- create_table :day_entries, :force => true do |t|
- t.references :invoice
- t.datetime :spent_at
- t.string :name
- end
-
-end
+end
View
31 spec/fixtures/mongoid/models.rb
@@ -6,7 +6,6 @@ class Post
field :text, type: String
default_scope order_by([[:created_at, :asc]])
- has_and_belongs_to_many :tags
def self.factory(text, created_at = nil)
create!(:text => text, :created_at => created_at)
@@ -33,33 +32,3 @@ def self.find_by_name(name)
where(:name => name).first
end
end
-
-class Tag
- include Mongoid::Document
- include Mongoid::Timestamps
- include Mongoid::ByStar
-
- field :name, type: String
-
- has_and_belongs_to_many :posts
-end
-
-class Invoice
- include Mongoid::Document
- include Mongoid::ByStar
-
- field :value, type: Integer
- field :number, type: Integer
-
- has_many :day_entries
-end
-
-class DayEntry
- include Mongoid::Document
- include Mongoid::ByStar
-
- field :spent_at, type: DateTime
- field :name, type: String
-
- belongs_to :invoice
-end
View
10 spec/time_ext_spec.rb
@@ -1,10 +0,0 @@
-require 'spec_helper'
-describe Time do
- it "should work out the beginning of a weekend (Friday 3pm)" do
- Time.now.beginning_of_weekend.strftime("%A %I:%M%p").should eql("Friday 03:00PM")
- end
-
- it "should work out the end of a weekend (Monday 3am)" do
- Time.now.end_of_weekend.strftime("%A %I:%M%p").should eql("Monday 03:00AM")
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.