Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ActiveRecord-backed fixtures. #1105

Merged
merged 3 commits into from
Aug 31, 2015

Conversation

beauby
Copy link
Contributor

@beauby beauby commented Aug 31, 2015

They are namespaced inside ARModels to avoid conficts with PORO models (that we might want to namespace as well).


has_many :comments
belongs_to :author
url :comments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't someone suggest a convention for fixtures of something like

class Post < AR::Base
  # stuff
  class PostSerializer < AM::Serializer
    # stuff
  end
end

@bf4
Copy link
Member

bf4 commented Aug 31, 2015

👍 except master doesn't have activerecord nor sqlite, right?

@beauby
Copy link
Contributor Author

beauby commented Aug 31, 2015

You're obviously right!

@bf4
Copy link
Member

bf4 commented Aug 31, 2015

It sort of does by accident in dev... which is why I made #1090

@beauby beauby force-pushed the add-activerecord-fixtures branch from d3d3878 to e870f73 Compare August 31, 2015 03:47
@beauby
Copy link
Contributor Author

beauby commented Aug 31, 2015

Fixed the deps.

@beauby beauby force-pushed the add-activerecord-fixtures branch 2 times, most recently from 6470195 to 86b9aef Compare August 31, 2015 04:18
@beauby beauby force-pushed the add-activerecord-fixtures branch from 86b9aef to 83f11ac Compare August 31, 2015 04:19
gem 'activerecord'
gem 'sqlite3', platform: :ruby
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're probably right that all the rails stuff above should be in a gem :test group..

@joaomdmoura
Copy link
Member

Cool @beauby this will be really helpful into new feature cc/ @NullVoxPopuli

joaomdmoura added a commit that referenced this pull request Aug 31, 2015
@joaomdmoura joaomdmoura merged commit 8d3a89e into rails-api:master Aug 31, 2015
Eric-Guo added a commit to Eric-Guo/active_model_serializers that referenced this pull request Sep 7, 2015
Eric-Guo added a commit to Eric-Guo/active_model_serializers that referenced this pull request Sep 7, 2015
Eric-Guo added a commit to Eric-Guo/active_model_serializers that referenced this pull request Sep 7, 2015
Eric-Guo added a commit to Eric-Guo/active_model_serializers that referenced this pull request Sep 7, 2015
Eric-Guo added a commit to Eric-Guo/active_model_serializers that referenced this pull request Sep 7, 2015
joaomdmoura added a commit that referenced this pull request Sep 7, 2015
NullVoxPopuli pushed a commit to NullVoxPopuli/active_model_serializers that referenced this pull request Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants