Skip to content

Commit

Permalink
Merge pull request #403 from arthurnn/fix_tables_tests
Browse files Browse the repository at this point in the history
Fix table names on tests
  • Loading branch information
spastorino committed Oct 17, 2013
2 parents 24d32ad + d58ae2f commit db20fd2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.bundle
.config
.yardoc
Gemfile.lock
*.lock
InstalledFiles
_yardoc
coverage
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rvm:
- rbx-19mode
gemfile:
- Gemfile
- Gemfile.rails3
- Gemfile.edge
notifications:
email: false
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ gemspec
gem 'sqlite3'
gem 'coveralls', :require => false
gem 'simplecov', :require => false

gem 'rails', "~> 4.0.0"
11 changes: 11 additions & 0 deletions Gemfile.rails3
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'

# Specify gem dependencies in active_model_serializers.gemspec
gemspec

gem 'minitest'
gem 'sqlite3'
gem 'coveralls', :require => false
gem 'simplecov', :require => false

gem 'rails', "~> 3.2"
4 changes: 2 additions & 2 deletions test/fixtures/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@

class ARPost < ActiveRecord::Base
has_many :ar_comments, class_name: 'ARComment'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_posts_tags
belongs_to :ar_section, class_name: 'ARSection'
end

class ARComment < ActiveRecord::Base
belongs_to :ar_post, class_name: 'ARPost'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag'
has_and_belongs_to_many :ar_tags, class_name: 'ARTag', join_table: :ar_comments_tags
end

class ARTag < ActiveRecord::Base
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'bundler/setup'
require 'coverage_setup'
require 'test/unit'
require 'minitest/autorun'
require 'active_model_serializers'
require 'fixtures/poro'

Expand Down

0 comments on commit db20fd2

Please sign in to comment.