Skip to content
Browse files

Fixing test failture

  • Loading branch information...
1 parent 7ceea08 commit 66d10dd18f797dcaa2b9b2d8113cad328086602a @kirs kirs committed
Showing with 8 additions and 5 deletions.
  1. +1 −1 app/models/discussion.rb
  2. +1 −1 app/models/message.rb
  3. +1 −1 inboxes.gemspec
  4. +5 −2 spec/fake_app.rb
View
2 app/models/discussion.rb
@@ -1,7 +1,7 @@
class Discussion < ActiveRecord::Base
attr_accessor :recipient_tokens, :recipient_ids
attr_reader :recipient_ids
- attr_accessible :recipient_tokens, :messages_attributes
+ attr_accessible :recipient_tokens, :messages_attributes, :user, :recipient_ids
# creater
has_many :messages, :dependent => :destroy
View
2 app/models/message.rb
@@ -1,6 +1,6 @@
class Message < ActiveRecord::Base
- attr_accessible :body
+ attr_accessible :body, :user, :discussion
default_scope order(:created_at)
View
2 inboxes.gemspec
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "pg"
s.add_development_dependency "sqlite3"
s.add_development_dependency 'rspec', ['>= 0']
- s.add_development_dependency 'factory_girl_rails'
+ s.add_development_dependency 'factory_girl_rails', ['>= 2.6']
s.add_development_dependency 'rspec-rails', ['>= 0']
# s.add_development_dependency 'rr', ['>= 0']
# s.add_development_dependency 'steak', ['>= 0']
View
7 spec/fake_app.rb
@@ -11,8 +11,11 @@
require 'devise/orm/active_record'
# database
-ActiveRecord::Base.configurations = {'test' => {:adapter => 'postgresql', :database => 'inboxes_test', :username => "postgres"}}
-# ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
+if ENV['TRAVIS'].present?
+ ActiveRecord::Base.configurations = {'test' => {:adapter => 'postgresql', :database => 'inboxes_test', :username => "postgres"}}
+else
+ ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
+end
ActiveRecord::Base.establish_connection('test')
# config

0 comments on commit 66d10dd

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